Archived project to wrap the Urho3D engine for C#, allowing it to be used on any .net core (NetStandard 2.0+ ie .net6/7/8) runtime and is fully mobile supported.

EgorBo 18d6576182 hot-fixes for UWP: Window size issue, Platforms returns 'Windows' instead of UWP, invalid error message. 8 vuotta sitten
Bindings 18d6576182 hot-fixes for UWP: Window size issue, Platforms returns 'Windows' instead of UWP, invalid error message. 8 vuotta sitten
Docs 3aa1039af5 update docs one more time 8 vuotta sitten
Extensions dee4de11d4 make ARKitComponent and ARCoreComponent more linker friendly, fix android crash (race condition because of sleeps in the for loops) 8 vuotta sitten
Nuget b6d3d41937 update nuspecs 8 vuotta sitten
ProjectTemplates bfc2867003 Rename HoloLens to SharpReality (see https://github.com/xamarin/urho/issues/206) (rename folders and file names) 8 vuotta sitten
Samples @ b05f2f2fe0 93f0292b1e update samples 8 vuotta sitten
Screenshots 3726194b33 update README.md 8 vuotta sitten
SharpieBinder a0dcce86d3 Binder: surface int& and float& fixes #297 8 vuotta sitten
Tests 3cdba1fdc4 Show current architecture in MonoDebugHud 8 vuotta sitten
Urho3D 18d6576182 hot-fixes for UWP: Window size issue, Platforms returns 'Windows' instead of UWP, invalid error message. 8 vuotta sitten
docs 2f83a89636 update docs 8 vuotta sitten
.gitignore 187f73c5d8 Add Linux support 8 vuotta sitten
.gitmodules fc1c376cef Move Urho3D to xamarin/Urho3D 10 vuotta sitten
ClassHierarchy.md f1fdc5561c Update ClassHierarchy.md 10 vuotta sitten
LICENSE 7d8915c901 Update license 10 vuotta sitten
MakeAndroid 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
MakeLinux 187f73c5d8 Add Linux support 8 vuotta sitten
MakeMac 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
MakeSharpReality 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
MakeSharpReality.bat 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
MakeUWP 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
MakeUWP.bat 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
MakeWindows 14db35314e fix MakeWindows 8 vuotta sitten
MakeWindows.bat 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
Makefile 14db35314e fix MakeWindows 8 vuotta sitten
MakeiOS 2e2bbd935c Get rid of WEBP support - (reduces native binary size by 5-7mb) 8 vuotta sitten
Namespaces.md b38dae7c04 Add some ideas on renamespacing 10 vuotta sitten
README.md 195ece7767 Update README.md 8 vuotta sitten
TODO.md 74f3bb9ec6 Update TODO, add RenderPath.Clone 10 vuotta sitten
Urho.ARCore.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.Cocoa.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.Forms.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.SharpReality.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.Tools.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.WinForms.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.Wpf.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.nuspec b6d3d41937 update nuspecs 8 vuotta sitten
Urho.sln f2c4f07a31 Add optional DirectX11 backend to nuget 8 vuotta sitten
UrhoSharp.png 74c4007c00 New icon for the project templates and the Nuget 10 vuotta sitten

README.md

# UrhoSharp

UrhoSharp is a lightweight Game Engine suitable for using with C# and F# to create games and 3D applications. The game engine is available as a portable class library, allowing your game code to be written once and shared across all platforms. UrhoSharp is powered by Urho3D, a game engine that has been under development for more than a decade. More information can be found in the UrhoSharp documentation. The bindings for Urho3D are licensed under the MIT license, as found on the LICENSE file.

Key advantages:

  • Lightweight - ~10mb per platform including basic assets
  • Embeddable - can be embedded into any app as a subview (UIView, NSView, Panel, etc).
  • Open-source - C# bindings and the underlying C++ engine Urho3D are licensed under the MIT License
  • Powerful 3rd parties - Bullet, Box2D, Recast/Detour, kNet, FreeType
  • Advanced graphics using physically based rendering (PBR), Skeletal animation, Inverse Kinematics etc
  • Simple code-first approach (however, it still supports native Urho3D editor)

Supported platforms:

  • Windows, WPF, WinForms
  • iOS, tvOS
  • macOS
  • Android
  • UWP
  • AR: HoloLens, ARKit, ARCore
  • Mixed Reality
  • Xamarin.Forms (iOS, Android, UWP)
  • Ubuntu


Sample Sample

Sample

Samples

Sample code lives in https://github.com/xamarin/urho-samples and repository has them as a git submodule. Samples use UrhoSharp via nuget.

Setup

Available on NuGet:

Quick start

To help developers get up and running quickly with UrhoSharp we are providing a solution template for Visual Studio (you can find it in "Online templates" tab). This template consists of PCL+Android+iOS+Mac/Windows with a simple scene and some assets (Xamarin Studio templates will be available soon):

VS

How to build bindings

This is currently a little messy, so YMMV.

In order to compile binaries for all platforms you will need both Windows and OS X environment. Please follow these steps:

Compile UrhoSharp on macOS

  • XCode
  • Visual Studio for Mac
  • CMake (brew install cmake)
  • Command Line tools (xcode-select --install)
  • Android NDK + ANDROID_NDK_HOME environment variable

1. Clone the repository including submodules

git clone [email protected]:xamarin/urho.git --recursive

2. Compile Urho.pch, SharpieBinder and generate bindigs

The following command will download Clang 3.7.0 if you do not have it installed, and use this to scan the Urho header files, then compile the sources to PCH, parse it via SharpieBinder and generate C# bindings. Additionally there is a perl script to generate bindings to Urho3D events.

make Generated

3. Compile UrhoSharp for Mac (fat dylib)

make Mac

it takes 5-10 minutes.

4. Compile UrhoSharp for iOS (fat dylib: i386, x86_64, armv7, arm64)

make iOS SDK_VER=11.2

5. Compile UrhoSharp for Android (armeabi, armeabi-v7a, arm64, x86, x86_64)

make -j5 Android

-j5 means a job per ABI. Make sure you have installed Android SDK and NDK (see MakeAndroid file) This target can also be executed on Windows.

Compile UrhoSharp on Windows

Obviously you can't do it on OS X so you have to switch to Windows environment. Make sure you have installed:

  • Visual Studio 2017
  • CMake 3.10
  • GNU make (cygwin) - the easiest way to install it is to follow instructions to install mono:
    • Download Cygwin from www.cygwin.com (setup-x86-64.exe)
    • Run the following command in cmd.exe to install the required packages: setup-x86_64.exe -P autoconf,automake,bison,gcc-core,gcc-g++,mingw64-i686-runtime,mingw64-i686-binutils,mingw64-i686-gcc-core,mingw64-i686-gcc-g++,mingw64-i686-pthreads,mingw64-i686-w32api,mingw64-x86_64-runtime,mingw64-x86_64-binutils,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,mingw64-x86_64-pthreads,mingw64-x86_64-w32api,libtool,make,python,gettext-devel,gettext,intltool,libiconv,pkg-config,git,curl,wget,libxslt,bc,patch
    • Execute Cygwin.bat and navigate to the folder where UrhoSharp is located (e.g. cd /cygdrive/c/projects/urho)

Execute:

make Windows

Then, open Urho.sln and compile UrhoSharp.Windows project in Release configuration. By default, Urho on windows uses OpenGL, but you can also use DirectX11. In order order to use it, execute:

make Windows_D3D11

And compile `UrhoSharp.WindowsD3D' project. All compiled binaries could be found in the Bin/{platform} folder.

Compile UrhoSharp for UWP and HoloLens

Execute:

make UWP
make SharpReality

And compile UrhoSharp.UWP and UrhoSharp.SharpRealitys projects in Release configuration.

Compile UrhoSharp on Ubuntu or WSL (Windows Subsystem for Linux)

Special thanks to https://gist.github.com/aktowns
Disclaimer: I am not a linux guy so I am not sure which packages from the following list are required, probably some of them are not:

sudo apt-get install cmake clang-3.7 avr-libc libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev libgl1-mesa-dev libx11-dev

Then just execute:

make Linux

Updating Documentation

Once you have a build, run the refresh-docs target, like this:

make refresh-docs

This will update the documentation based on the API changes. Then you can use a tool like DocWriter [1] on the Mac to edit the contents, or just edit the ECMA XML documentation by hand with an XML editor.

[1] http://github.com/xamarin/DocWriter