Code to integrate with the Urho3D engine
Перейти к файлу
EgorBo 2b935748e2 fix #326 2018-05-28 19:43:12 +03:00
Bindings Merge pull request #334 from kevinhartman/opt-culling 2018-05-22 20:42:01 +03:00
Docs update docs one more time 2017-12-03 19:54:29 +01:00
Extensions Fix ToMainThreadAsync(), Delay(), InvokeOnMain(). 2018-03-21 12:43:02 +03:00
Nuget fix paths 2018-03-02 18:00:22 +03:00
ProjectTemplates update project templates 2018-02-22 21:54:14 +03:00
Samples@f1bcec78cf update samples 2018-03-05 00:11:12 +03:00
Screenshots improve linux support 2018-02-23 17:55:40 +03:00
SharpieBinder Fix bug of generating extra class instead of struct(Copy paste problem) 2018-05-21 02:26:37 -07:00
Tests fix Playgrounds.NetCoreApp 2018-03-05 15:55:01 +03:00
Urho3D [Hololens] Calculate appropriate culling camera frustum and position. 2018-05-21 13:05:46 -04:00
docs update docs 2017-12-03 20:16:58 +01:00
.gitignore fix #273 - GetBoneSafe doesn't accept StringHash 2018-03-01 18:23:25 +03:00
.gitmodules Move Urho3D to xamarin/Urho3D 2015-11-12 16:43:08 +03:00
LICENSE Update license 2015-12-07 14:35:01 -05:00
MakeAndroid Get rid of WEBP support - (reduces native binary size by 5-7mb) 2018-02-20 03:31:17 +03:00
MakeLinux fix #326 2018-05-28 19:43:12 +03:00
MakeMac minor solution clean up: 2018-02-25 16:09:57 +03:00
MakeSharpReality Get rid of WEBP support - (reduces native binary size by 5-7mb) 2018-02-20 03:31:17 +03:00
MakeSharpReality.bat Get rid of WEBP support - (reduces native binary size by 5-7mb) 2018-02-20 03:31:17 +03:00
MakeUWP Get rid of WEBP support - (reduces native binary size by 5-7mb) 2018-02-20 03:31:17 +03:00
MakeUWP.bat Get rid of WEBP support - (reduces native binary size by 5-7mb) 2018-02-20 03:31:17 +03:00
MakeWindows fix MakeWindows 2018-02-21 02:19:55 +03:00
MakeWindows.bat update README.md 2018-03-02 17:51:11 +03:00
MakeWindowsAll.bat Add MakeWindowsAll.bat 2018-03-02 18:49:13 +03:00
Makefile improve linux support 2018-02-23 17:55:40 +03:00
MakeiOS fix #309 - UrhoSharp 1.8.* breaks compatibility with iOS 9 2018-03-05 12:01:58 +03:00
README.md Add Gitter badge 2018-05-24 02:42:00 +00:00
Urho.sln .NET Core lib 2018-03-01 14:50:16 +03:00
UrhoSharp.png New icon for the project templates and the Nuget 2015-11-18 21:22:06 +03:00

README.md

UrhoSharp

Join the chat at https://gitter.im/xamarin/urho

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

You will need:

  • 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 git@github.com: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:

You will need:

Open "Command Prompt for Visual Studio" (or regular CMD with msbuild.exe added to the PATH) Go to the project root directory and execute

MakeWindows.bat x64 Release 2017 OpenGL

All compiled binaries could be found in the Bin/{platform} folder. You can also change the parameters, for example the following command:

MakeWindows.bat x86 Debug 2017 DirectX

Compiles debug version of mono-urho.dll with DirectX as a backend.

Compile UrhoSharp on Linux*

Special thanks to @aktowns Prerequisites for Ubuntu 16.06

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

*Tested on Ubuntu 16.06, Fedora 25 and WSL

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