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 e5915b9809 Temporarily disable asserts_32.h 10 سال پیش
Bindings e5915b9809 Temporarily disable asserts_32.h 10 سال پیش
Docs c9e5cb2788 Document small lessons 10 سال پیش
Nuget bb1362f48f Remove Windows/Mac libs from Urho.Forms.nuspec 10 سال پیش
ProjectTemplates 76f9b850df Fix $saferootprojectname$ issue in VSIX 10 سال پیش
Samples @ 1d9125741e 0844eaf0dc Undo accidental use of older samples 10 سال پیش
SharpieBinder de0664708c Add asserts for both x86 and 64 bits 10 سال پیش
Urho3D de0664708c Add asserts for both x86 and 64 bits 10 سال پیش
docs 3c15d2604a Updated docs 10 سال پیش
.gitignore a612cdfc89 Fix nuget.config after moving samples to FeatureSamples dir 10 سال پیش
.gitmodules fc1c376cef Move Urho3D to xamarin/Urho3D 10 سال پیش
ClassHierarchy.md f1fdc5561c Update ClassHierarchy.md 10 سال پیش
LICENSE 7d8915c901 Update license 10 سال پیش
MakeAndroid 400fa527bd Rename binding to Binding and docs to Docs 10 سال پیش
MakeMac 400fa527bd Rename binding to Binding and docs to Docs 10 سال پیش
MakeWindows 704a0f641b Fix build error 10 سال پیش
Makefile 6d4e3375f0 Store Scene objects via strong references 10 سال پیش
MakeiOS 400fa527bd Rename binding to Binding and docs to Docs 10 سال پیش
MaketvOS 400fa527bd Rename binding to Binding and docs to Docs 10 سال پیش
Namespaces.md b38dae7c04 Add some ideas on renamespacing 10 سال پیش
README.md eb91af6934 Fix UrhoSurface for Xamarin.Forms iOS 10 سال پیش
TODO.md 74f3bb9ec6 Update TODO, add RenderPath.Clone 10 سال پیش
Urho.Forms.nuspec a0dfd300fc [Forms] Fix typo in Urho.Forms.nuspec 10 سال پیش
Urho.nuspec 005e16ce4d Add Urho.Forms.nuspec 10 سال پیش
Urho.sln 28bddbdb32 Fix profile for Urho.Forms.dll in nuspec 10 سال پیش
UrhoSharp.png 74c4007c00 New icon for the project templates and the Nuget 10 سال پیش

README.md

UrhoSharp

UrhoSharp is a lightweight Game Engine suitable for using with C# and F# to create games that run on Android, iOS, Mac, Windows and Unix. 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.

Samples

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

Sample Sample

Setup

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:

1. Install:

  • XCode
  • Xamarin Studio
  • CMake (i.e. "brew install cmake")
  • Mono 64 bit (i.e. "brew install mono")
  • Command Line tools ("xcode-select --install")
  • Android NDK (and ANDROID_NDK variable)

2. Clone the repository including submodules

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

3. Compile Urho.pch

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:

make PchMac

4. Generate C# bindings from Urho.pch

Open SharpieBinder/SharpieBinder.sln via Xamarin Studio and change .NET runtime to 64 bit mono (installed from homebrew is usually located in "/usr/local/Cellar/4.x.x.x"). Run SharpieBinder project and make sure it generated *.cs files in /bindings/generated dir.

Alternatively, you can do make SharpieBinder.

Then execute:

make ParseEventsMac

it should generate bindings/generated/events.cpp file

5. Compile UrhoSharp for Mac (fat dylib)

make Mac

it takes 5-10 minutes.

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

make iOS

Note: Make sure you have an iOS 9.0 simulator target or modify SDKVER to target another simulator.

7. Compile UrhoSharp for Android (armeabi, armeabi-v7a, x86)

make -j3 Android

-j3 means a job per ABI. Make sure you have installed Android SDK and NDK (see MakeAndroid file)

8. Compile UrhoSharp for Windows (64 bit)

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

  • Visual Studio 2015
  • CMake
  • GNU make (e.g. cygwin)

SharpieBinder doesn't work on Windows yet so you will have to copy bindings/generated folder from OS X environment to Windows.

Execute:

make Windows64  (or Windows32)

(you can also compile Android on Windows via "make Android") Then, open Urho.sln and compile MonoUrho.Windows project in Release configuration.

All compiled binaries could be found in the Bin/{platform} folder.