• This repository has been archived on 08/Nov/2022
  • Stars
    star
    458
  • Rank 91,990 (Top 2 %)
  • Language
    C#
  • License
    Other
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code to integrate with the Urho3D engine

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 NETStandard 2.0 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 (net45)
  • iOS (xamarin.ios10)
  • macOS
  • Android (monodroid81)
  • UWP (uap10.0.16299)
  • 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
  • Homebrew (/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install))
  • CMake (brew install cmake)
  • Command Line tools (xcode-select --install)
  • Android NDK + ANDROID_NDK_HOME environment variable

NOTE: UrhoSharp.csproj and UrhoSharp.Forms.csproj are SDK-style NETStandard2.0 projects with multi-targeting, unfortunately Visual Studio for Mac currently doesn't fully support such projects so you have to compile them using msbuild CLI, e.g. cd Bindings/Forms && msbuild /restore UrhoSharp.Forms.csproj /p:Configuration=Release /p:Platform=AnyCpu

If you have an error message tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance during compilation try to switch developer directory like this sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

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 usually takes 5-10 minutes.

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

make iOS SDK_VER=12.1

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

More Repositories

1

Xamarin.Forms

Xamarin.Forms Official Home
C#
5,634
star
2

xamarin-forms-samples

Sample apps built using the Xamarin.Forms framework
C#
4,302
star
3

xamarin-macios

Bridges the worlds of .NET with the native APIs of macOS, iOS, tvOS, and watchOS.
C#
2,359
star
4

monodroid-samples

A collection of Xamarin.Android sample projects.
C#
2,197
star
5

XamarinComponents

Plugins for Xamarin
C#
1,989
star
6

xamarin-android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
C#
1,866
star
7

XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
C#
1,590
star
8

ios-samples

Xamarin.iOS sample apps
C#
1,590
star
9

Essentials

Essential cross platform APIs for your mobile apps.
C#
1,527
star
10

mobile-samples

C#
1,460
star
11

XobotOS

XobotOS - Android ported to C#
Java
1,246
star
12

xamarin-forms-book-samples

Code samples for "Creating Mobile Apps with Xamarin.Forms"
C#
730
star
13

docs-archive

Xamarin docs archive
Java
564
star
14

Xamarin.Auth

Xamarin.Auth
C#
544
star
15

app-crm

C#
386
star
16

urho-samples

Samples for the Urho bindings
C#
385
star
17

Sport

C#
357
star
18

Monkey.BluetoothLE

BluetoothLE abstraction for use with Xamarin projects, including Xamarin.Forms.
C#
349
star
19

mac-samples

Sample programs showing how to use Xamarin.Mac on OSX.
C#
323
star
20

WebSharp

Support for running C# on the web browser.
C#
302
star
21

GooglePlayServicesComponents

C#
300
star
22

mqtt

Minimalist and intuitive MQTT broker and client written entirely in C#
C#
297
star
23

dev-days-labs

C#
295
star
24

KimonoDesigner

Paint application using Xamarin.Mac and SkiaSharp
C#
257
star
25

SignaturePad

C#
247
star
26

GoogleApisForiOSComponents

C#
222
star
27

prebuilt-apps

Complete, prebuilt apps for you to customize and deploy.
C#
217
star
28

xamarin-forms-book-preview-2

Sample code for the 2nd Preview Edition of "Creating Mobile Apps with Xamarin.Forms"
C#
208
star
29

flex

Flex is a flexible box layout system written in C, designed to be easy to consume from other languages
C
188
star
30

Workbooks

C#
187
star
31

java.interop

Java.Interop provides open-source bindings of Java's Java Native Interface (JNI) for use with .NET managed languages such as C#
C#
181
star
32

AndroidX

AndroidX (Jetpack) bindings for Xamarin.Android
C#
162
star
33

binding-tools-for-swift

C#
150
star
34

AndroidSupportComponents

Xamarin bindings for Android Support libraries - For AndroidX see https://github.com/xamarin/AndroidX
C#
147
star
35

XamarinStripe

Stripe.com .NET bindings
C#
134
star
36

Xamarin.Social

Xamarin.Social
C#
125
star
37

AngryNinjas

Angry Ninjas Cocos2D/XNA Sample
C#
120
star
38

customer-success-samples

Xamarin Customer Success
104
star
39

KinderChat

Secure Texting for Children
C#
98
star
40

VervetaCRM

Publicly available CRM demonstration app.
C#
97
star
41

ExposureNotification.Sample

A sample cross-platform mobile app and server for exposure notifications.
C#
95
star
42

mini-hacks

Complete four mini-hacks during Evolve and get a prize.
C#
89
star
43

PortableRazor

A lightweight implementation of ASP.NET MVC APIs for mobile devices.
C#
88
star
44

FacebookComponents

C#
87
star
45

Seminars

Sample code used in the Xamarin Seminars
C#
68
star
46

amazon

Library for accessing Amazon web services from mobile apps
C#
62
star
47

xamarin-forms-book-preview

Sample code for the Preview Edition of "Creating Mobile Apps with Xamarin.Forms"
C#
61
star
48

mac-ios-samples

Samples targeting both iOS and OSX that share code.
C#
57
star
49

XamarinAzureChallenge

Create an iOS/Android app using Xamarin.Forms and connect it to a serverless Azure Function
C#
56
star
50

Touch.Unit

NUnitLite based runner for unit testing .NET code under iOS
C#
50
star
51

google-apis

Google API bindings for Xamarin.
C#
47
star
52

xamarin-evolve-2014

Slides, Demos and Training samples for Evolve 2014 from Xamarin University
C#
45
star
53

mobcat

43
star
54

Rivets

A C# implementation of App Links, functionally, a port of Bolts
C#
43
star
55

app-xamarintv

Xamarin.Forms app demonstrating the dual-screen device capability for neo and duo devices
C#
42
star
56

Xamarin.Forms.CarouselView

C#
41
star
57

Xamarin.Forms.GraphQL

C#
41
star
58

android-activity-controller

C#
36
star
59

evolve-quest

Evolve Quest is an iBeacon based scavenger hunt that attendees enjoyed at Evolve 2014
C#
35
star
60

xamarin-iot-samples

Samples for Xamarin IoT
C#
35
star
61

monotouch-element-pack

A place to host various MonoTouch.Dialog.Elements that users can use.
C#
35
star
62

Xamarin.Forms-api-docs

Xamarin.Forms API documentation in ECMA XML format
PowerShell
34
star
63

PortableRazorStarterKit

A starter kit for PortableRazor.
JavaScript
34
star
64

Xamarin.Legacy.Sdk

Starting from a .NET 6 project, adds the ability to target legacy Xamarin target frameworks such as monoandroid11.0 or xamarin.ios10. *Not fully supported*
33
star
65

SalesforceSDK

Salesforce SDK component
C#
31
star
66

LibZipSharp

A managed wrapper (and then some) around libzip (https://libzip.org/)
C#
28
star
67

xamarin-android-tools

C#
28
star
68

benchmarker

A simple benchmarking and comparison tool
C#
26
star
69

apple-api-docs

Xamarin.iOS & Xamarin.Mac API documentation in ECMA XML format
F#
26
star
70

sketches

Xamarin Sample Sketches
26
star
71

Xamarin.MacDev

Support libraries for xamarin-macios
C#
25
star
72

mirepoix

A small collection of utility APIs including command line argument splitting and quoting, file system globbing, cross platform process execution, and console output redirection handling.
C#
25
star
73

Xamarin.PropertyEditing

C#
24
star
74

xamarinu-connect2016

C#
23
star
75

app-customers

A simple demo app with three screens: a list screen, a read-only detail screen, and an editable detail screen.
C#
23
star
76

xunit

xUnit
C#
22
star
77

MyCompany

C#
22
star
78

jar2xml

Java Archive API extraction tool
Java
19
star
79

android-api-docs

Android API documentation
PowerShell
19
star
80

demo-xamarincrm

C#
19
star
81

XamarinAndroidXMigration

Build tasks and tools to support Xamarin.Android AndroidX migration
C#
18
star
82

Urho3D

Clone of the Urho3D repository
C++
18
star
83

xamarin-evolution

Maintains proposals for changes to the Xamarin SDKs (Android, iOS, Forms, Components, Urho, Skia)
18
star
84

dropbox-sync-component

C#
18
star
85

vs-mono-debugger-sample

Sample showing how to use the Visual Studio Mono Debugger for your own Mono-based project types
C#
17
star
86

DocWriter

Desktop Editor for the ECMA XML Documentation
C#
16
star
87

evolve-presentation-template

Evolve 2016 Presentation Templates
HTML
15
star
88

SaveTheDate

C#
14
star
89

xamarin-windows

Provides reusable MSBuild tasks and sample Visual Studio tooling for building and debugging Mono AOT compiled binaries
C#
14
star
90

fsharpbinding

F# binding for MonoDevelop (updated to support Xamarin Studio)
F#
14
star
91

Windows.Injector

Allows injecting .NET code into a remote process in Windows
C++
12
star
92

web-tests

C#
12
star
93

md-xamarin-fsharp-addins

F# magic
F#
11
star
94

fsharp-iOS-designer

iOS designer integration for F#
F#
11
star
95

moq

The most popular and friendly mocking library for .NET and Xamarin
C#
9
star
96

component-template

A sample template that you can use as a guide to create your own components.
Ruby
7
star
97

sales-uitest-extensions

Extension methods for UITest
C#
7
star
98

evolve-2014-presentation-template

Evolve 2014 Presentation Template
7
star
99

emscripten-test

C
6
star
100

Gendarme.Rules.Xamarin

Gendarme static analysis rules for Xamarin.
C#
6
star