Git Product home page Git Product logo

urho-samples's Introduction

UrhoSharp samples

This directory contains various samples for the UrhoSharp engine and they can be compiled for Android or iOS, or can be executed on Windows and Mac with the published NuGet package.

Samples

Some of the samples here include:

  • FormsSamples
  • FeatureSamples
  • SamplyGame
  • HoloLens, ARKit, ARCore
  • Mixed samples

ARKit, ARCore and HoloLens

These directories contain samples for running UrhoSharp on HoloLens, ARKit and ARCore.
Also there is a mixed sample that shares a scene between iOS, Android and HoloLens (see Mixed/AR)

Screenshot Screenshot

FormsSamples

The 'FormsSamples' solution demonstrates how UrhoSharp can be used in Xamarin.Forms applications as a View element.

Screenshot Screenshot

FeatureSamples

The toplevel FeatureSamples solution showcases 40 independent UrhoSharp features, each one showcasing a particular element of the framework and runs on all supported platforms.

Physics2D Water

SamplyGame

The SamplyGame directory contains a more complete game, it is a sample inspired by the gameplay and artwork of ShootySkies and shows a more complete game in action, showing how to load assets, write game code and structure a game. It is our first game build with this, so be kind.

Screenshot

Structure

All solutions are structured to have their cross platform code written in the Core directory, where we build a portable class library. While we have taken the approach of using Portable Class Libraries, you can also used Shared Projects.

The structure of each solution is this:

  • Assets: Contains the shared assets that are used for the various samples.

  • Core: Contains the various samples, one for each feature that is being showcased and it happens to be a Portable Class Library project, so it can be reused as-is across all supported platforms.

  • iOS: Contains the iOS launcher.

  • Android: Contains the Android launcher.

  • Mac: Contains the Mac launcher (but works on Windows too).

  • WPF: Contains the Windows launcher based on WPF.

  • WinForms: Contains the Windows launcher based on WinForms.

To build the samples

urho-samples's People

Contributors

cartblanche avatar define-private-public avatar egorbo avatar kzu avatar migueldeicaza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urho-samples's Issues

UrhoSharp.ARCore not present in NuGet Package

Where would we download/get UrhoSharp.ARCore? Was trying to test the ARCore sample here, but I can't seem to restore the packages used. What I did is I re-created the project, the problem is I can't find UrhoSharp.ARCore in the NuGet Package:

urho

Some things (like Frame, ARCoreComponents, Config, etc) seems to need UrhoSharp.ARCore, so in the end, I didn't manage to run the sample

UPDATE

I installed Xamarin.Google.ARCore, and changed using Com.Google.AR.Core to using Google.AR.Core. The problem is ARCoreComponent is still missing, although Frame and Config have been fixed

FormsSample still crashing with new version

Downloaded latest FormsSample (1.1.125), but it is still crashing as reported in #15. For example in XAP, clicking "Launch Sample", then navigating back with top back button, then clicking "Launch Sample" again causes crash.

Also, Android back button still does not work.

FormSample Crash/Build Issues

I am creating a new ticket since adding a comment to issue #10 doesn't seem to reopen it.

I downloaded the latest FormSample files and updated to the latest UrhoSharp.Forms 1.0.557 and Xamarin.Forms 2.2.0.43, but still have the same issues. Do I need to wait for something further?

ISSUES:

  1. Building in release mode fails.
  2. Pressing the back button does not return to the previous page and instead freezes the animation.
  3. Clicking the restart button after updating it to "restartBtn.Clicked += (sender, e) => Navigation.PushAsync(new UrhoPage());" causes the animation to freeze and eventually the following crash:

System.ArgumentException: 'jobject' must not be IntPtr.Zero.
Parameter name: jobject
at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod) [0x00010] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:170
at Android.Views.View.get_Context () [0x0002d] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:4891
at Urho.Forms.AndroidUrhoSurface+d__5.MoveNext () [0x000ad] in :0
at --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:372 at Urho.Forms.UrhoSurface+<Show>d__41[TUrhoApplication].MoveNext () [0x0008d] in :0
at --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:372
at FormsSample.UrhoPage+c__async1.MoveNext () [0x00086] in <project_path>/urho-samples-master/FormsSample/FormsSample/App.cs:84
at --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:994
at Android.App.SyncContext+c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18
at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36
at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:71
at at (wrapper dynamic-method) System.Object:baaf141f-1e29-4543-8d4e-0fd5bbe9d9be (intptr,intptr)

"Platform implementation is not referenced" on UWP

The sample runs fine for Android but whenever launching the UWP get the exception: "Platform implementation is not referenced". This happens in this line of code:
async void StartUrhoApp() { urhoApp = await urhoSurface.Show<UrhoApp>(new ApplicationOptions(assetsFolder: null) { Orientation = ApplicationOptions.OrientationType.LandscapeAndPortrait }); }
Got Xamarin.Forms at 2.3.0.107 and UrhoSharp.Forms at 1.0.557. Also tried Xamarin.Forms at 2.2.0.31 like the sample.

iOS FormsSample crashes on Launch Sample -> Back -> Launch Sample

Using the latest 1.1.214 FormsSample for iOS, it is consistently crashing when clicking Launch Sample -> Back -> Launch Sample. This is with a real iPad. Android works fine.

I also tried adding "await urhoApp.Exit ();" on going back, but that had the same failure behavior.

Below is the application output.

016-11-06 10:31:14.461 FormsSampleiOS[701:39004] Created 1 worker thread
2016-11-06 10:31:14.479 FormsSampleiOS[701:39004] Added resource package /private/var/mobile/Containers/Bundle/Application/AD194D92-2056-4435-AB8F-CF376D749A0C/FormsSampleiOS.app/CoreData.pak
2016-11-06 10:31:14.541 FormsSampleiOS[701:39004] Set screen mode 744x724 windowed resizable
2016-11-06 10:31:14.550 FormsSampleiOS[701:39004] Initialized input
2016-11-06 10:31:14.552 FormsSampleiOS[701:39004] Initialized user interface
2016-11-06 10:31:14.575 FormsSampleiOS[701:39004] Initialized renderer
2016-11-06 10:31:14.747 FormsSampleiOS[701:39004] Set audio mode 44100 Hz stereo interpolated
2016-11-06 10:31:14.749 FormsSampleiOS[701:39004] Initialized engine
Thread finished: #5
Thread finished: #4
2016-11-06 10:31:22.794 FormsSampleiOS[701:39004] Created 1 worker thread
2016-11-06 10:31:22.803 FormsSampleiOS[701:39004] Added resource package /private/var/mobile/Containers/Bundle/Application/AD194D92-2056-4435-AB8F-CF376D749A0C/FormsSampleiOS.app/CoreData.pak
2016-11-06 10:31:22.827 FormsSampleiOS[701:39004] Set screen mode 744x724 windowed resizable
2016-11-06 10:31:22.828 FormsSampleiOS[701:39004] Initialized input
2016-11-06 10:31:22.829 FormsSampleiOS[701:39004] Initialized user interface
2016-11-06 10:31:22.837 FormsSampleiOS[701:39004] Initialized renderer
2016-11-06 10:31:22.838 FormsSampleiOS[701:39004] Could not initialize audio output
2016-11-06 10:31:22.838 FormsSampleiOS[701:39004] Initialized engine

FeatureSample Testing; Quickstart & FormsSample Xamarin Android Demo working

I had downloaded the whole package of FeatureSample and compiled it with no errors into an APK file.

It was 40 mb and I started to run the app. The first page selection is running fine with all the selection of the 43 samples listed but when I try to test each one of them - there is a black screen that follow on - every single one of the declared activity.

  • Do you have similar problems running the FeatureSample app or is it just me?
  • I noticed in the Visual Studio that there is obsolete statement of AbsoluteLayout. What should I do with this?
  • I have disable Cocoa package to be compiled because of missing assemblies references, does this relate to building solution up of the whole package?

Thanks

Feature Sample 15 (Navigation) crashes when trying to set a waypoint

I'm running UrhoSharp from the NuGet packages on El Capitan. All other controls work (including teleportation), but when trying to lay down the first waypoint the application seg faulted and then spat this out in the terminal:

Sat Jul  2 22:59:21 2016] INFO: Opened log file Urho3D.log
[Sat Jul  2 22:59:21 2016] INFO: Created 1 worker thread
[Sat Jul  2 22:59:21 2016] INFO: Added resource package /Users/ben/Desktop/UrhoSharpTutorials/Assets/CoreData.pak
[Sat Jul  2 22:59:21 2016] INFO: Added resource path /Users/ben/Desktop/UrhoSharpTutorials/Assets/Data/
[Sat Jul  2 22:59:21 2016] INFO: Set screen mode 1024x768 windowed
[Sat Jul  2 22:59:21 2016] INFO: Initialized input
[Sat Jul  2 22:59:21 2016] INFO: Initialized user interface
[Sat Jul  2 22:59:21 2016] INFO: Initialized renderer
2016-07-02 22:59:22.033 mono32[909:20203] 22:59:22.032 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
[Sat Jul  2 22:59:22 2016] INFO: Set audio mode 44100 Hz stereo interpolated
[Sat Jul  2 22:59:22 2016] INFO: Initialized engine
[Sat Jul  2 22:59:22 2016] WARNING: StaticModel::SetModel() called on AnimatedModel. Redirecting to AnimatedModel::SetModel()
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) Urho.Navigation.NavigationMesh.urho_navigationmesh_findpath (intptr,Urho.Vector3,Urho.Vector3,int&) <0x00012>
  at Urho.Navigation.NavigationMesh.FindPath (Urho.Vector3,Urho.Vector3) <IL 0x00015, 0x0011f>
  at Urho.Samples.Navigation.SetPathPoint () [0x000c1] in /Users/ben/Desktop/UrhoSharpTutorials/15.Navigation/Navigation.cs:348
  at Urho.Samples.Navigation.MoveCamera (single) [0x001b4] in /Users/ben/Desktop/UrhoSharpTutorials/15.Navigation/Navigation.cs:188
  at Urho.Samples.Navigation.OnUpdate (single) [0x0000a] in /Users/ben/Desktop/UrhoSharpTutorials/15.Navigation/Navigation.cs:145
  at Urho.Application.HandleUpdate (Urho.UpdateEventArgs) <IL 0x00028, 0x00131>
  at Urho.Engine/<>c__DisplayClass104_0.<SubscribeToUpdate>b__0 (intptr) <IL 0x00019, 0x000b3>
  at Urho.UrhoObject.ObjectCallback (intptr,int,intptr) <IL 0x00014, 0x000ab>
  at (wrapper native-to-managed) Urho.UrhoObject.ObjectCallback (intptr,int,intptr) <IL 0x0001f, 0x000a3>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) Urho.Application.Application_Run (intptr) <0x00012>
  at Urho.Application.Run () <IL 0x00006, 0x0003f>
  at Urho.Samples.Navigation.Main () [0x0001c] in /Users/ben/Desktop/UrhoSharpTutorials/15.Navigation/Navigation.cs:454
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int (object,intptr,intptr,intptr) <IL 0x00053, 0x001e2>

Native stacktrace:


Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.aCcWtN'
Executing commands in '/tmp/mono-gdb-commands.aCcWtN'.
(lldb) process attach --pid 909
Process 909 stopped
* thread #1: tid = 0x4eeb, 0x91223cee libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50b', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x91223cee libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
->  0x91223cee <+10>: jae    0x91223cfe                ; <+26>
    0x91223cf0 <+12>: calll  0x91223cf5                ; <+17>
    0x91223cf5 <+17>: popl   %edx
    0x91223cf6 <+18>: movl   0x11cfc32f(%edx), %edx

Executable module set to "/Library/Frameworks/Mono.framework/Versions/4.4.1/bin/mono32".
Architecture set to: i386-apple-macosx.
(lldb) thread list
Process 909 stopped
* thread #1: tid = 0x4eeb, 0x91223cee libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50b', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x4eec, 0x912233ea libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #3: tid = 0x4eee, 0x9121c4d6 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'tid_1603'
  thread #4: tid = 0x4ef0, 0x912247fa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
  thread #5: tid = 0x4ef1, 0x91223646 libsystem_kernel.dylib`__recvfrom + 10, name = 'tid_1507'
  thread #6: tid = 0x4f2e, 0x91223422 libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_ae03'
  thread #7: tid = 0x4f32, 0x9121c49a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
  thread #8: tid = 0x4f3c, 0x9121c49a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread'
(lldb) thread backtrace all
* thread #1: tid = 0x4eeb, 0x91223cee libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50b', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x91223cee libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x9ccaf7dc libsystem_c.dylib`waitpid$UNIX2003 + 48
    frame #2: 0x0013752d mono32`mono_handle_native_sigsegv(signal=11, ctx=0x0071bfe0, info=0x0071bfa0) + 541 at mini-exceptions.c:2348 [opt]
    frame #3: 0x001875a2 mono32`mono_arch_handle_altstack_exception(sigctx=<unavailable>, siginfo=<unavailable>, fault_addr=<unavailable>, stack_ovf=0) + 162 at exceptions-x86.c:1107 [opt]
    frame #4: 0x00079d33 mono32`mono_sigsegv_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) + 467 at mini-runtime.c:2888 [opt]
    frame #5: 0x94c2479b libsystem_platform.dylib`_sigtramp + 43
    frame #6: 0x01faa467 libmono-urho.dylib`Urho3D::NavigationMesh::FindPath(Urho3D::PODVector<Urho3D::NavigationPathPoint>&, Urho3D::Vector3 const&, Urho3D::Vector3 const&, Urho3D::Vector3 const&, dtQueryFilter const*) + 199
    frame #7: 0x01faa25c libmono-urho.dylib`Urho3D::NavigationMesh::FindPath(Urho3D::PODVector<Urho3D::Vector3>&, Urho3D::Vector3 const&, Urho3D::Vector3 const&, Urho3D::Vector3 const&, dtQueryFilter const*) + 76
    frame #8: 0x024a4b2d libmono-urho.dylib`urho_navigationmesh_findpath + 109
    frame #9: 0x092c7cec
    frame #10: 0x092c7910
    frame #11: 0x092c6abc
    frame #12: 0x0827a5c4
    frame #13: 0x082798e8
    frame #14: 0x082789da
    frame #15: 0x08278884
    frame #16: 0x082783c4
    frame #17: 0x0825b20c
    frame #18: 0x024cb41a libmono-urho.dylib`NotificationProxy::Invoke(Urho3D::HashMap<Urho3D::StringHash, Urho3D::Variant>&) + 74
    frame #19: 0x01e349a6 libmono-urho.dylib`Urho3D::Object::OnEvent(Urho3D::Object*, Urho3D::StringHash, Urho3D::HashMap<Urho3D::StringHash, Urho3D::Variant>&) + 150
    frame #20: 0x01e3551b libmono-urho.dylib`Urho3D::Object::SendEvent(Urho3D::StringHash, Urho3D::HashMap<Urho3D::StringHash, Urho3D::Variant>&) + 811
    frame #21: 0x01e53bc5 libmono-urho.dylib`Urho3D::Engine::Update() + 181
    frame #22: 0x01e53ae5 libmono-urho.dylib`Urho3D::Engine::RunFrame() + 213
    frame #23: 0x01e44515 libmono-urho.dylib`Urho3D::Application::Run() + 117
    frame #24: 0x0241d267 libmono-urho.dylib`Application_Run + 23
    frame #25: 0x007e4ed0
    frame #26: 0x007e4e08
    frame #27: 0x0067fc24
    frame #28: 0x0067fe6b
    frame #29: 0x0007d567 mono32`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 951 at mini-runtime.c:2578 [opt]
    frame #30: 0x00255b86 mono32`mono_runtime_invoke(method=0x7d2546c0, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 150 at object.c:2897 [opt]
    frame #31: 0x0025bb41 mono32`mono_runtime_exec_main(method=0x7d2546c0, args=<unavailable>, exc=0x00000000) + 401 at object.c:4223 [opt]
    frame #32: 0x0025b8f8 mono32`mono_runtime_run_main(method=0x7d2546c0, argc=<unavailable>, argv=<unavailable>, exc=<unavailable>) + 632 at object.c:3837 [opt]
    frame #33: 0x000fb975 mono32`mono_jit_exec(domain=<unavailable>, assembly=<unavailable>, argc=<unavailable>, argv=<unavailable>) + 213 at driver.g.c:1031 [opt]
    frame #34: 0x000fde3c mono32`mono_main [inlined] main_thread_handler + 8396 at driver.g.c:1091 [opt]
    frame #35: 0x000fde04 mono32`mono_main(argc=<unavailable>, argv=<unavailable>) + 8340 at driver.g.c:2162 [opt]
    frame #36: 0x0006e7a1 mono32`main [inlined] mono_main_with_options(argc=4, argc=4, argc=4, argv=0xbff94a88, argv=0xbff94a88, argv=0xbff94a88) + 33 at main.c:28 [opt]
    frame #37: 0x0006e780 mono32`main(argc=4, argv=0xbff94a88) + 1184 at main.c:177 [opt]
    frame #38: 0x0006e2d5 mono32`start + 53

  thread #2: tid = 0x4eec, 0x912233ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #0: 0x912233ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x9b620538 libsystem_pthread.dylib`_pthread_cond_wait + 757
    frame #2: 0x9b622276 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
    frame #3: 0x002b72eb mono32`thread_func [inlined] mono_os_cond_wait(mutex=0xb00810b0) + 18 at mono-os-mutex.h:105 [opt]
    frame #4: 0x002b72d9 mono32`thread_func(thread_data=0x00000000) + 457 at sgen-thread-pool.c:118 [opt]
    frame #5: 0x9b61f780 libsystem_pthread.dylib`_pthread_body + 138
    frame #6: 0x9b61f6f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #7: 0x9b61cf7a libsystem_pthread.dylib`thread_start + 34

  thread #3: tid = 0x4eee, 0x9121c4d6 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'tid_1603'
    frame #0: 0x9121c4d6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x0025346e mono32`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 14 at mono-os-semaphore.h:72 [opt]
    frame #2: 0x00253460 mono32`finalizer_thread [inlined] mono_coop_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 10 at mono-coop-semaphore.h:40 [opt]
    frame #3: 0x00253456 mono32`finalizer_thread(unused=0x00000000) + 118 at gc.c:711 [opt]
    frame #4: 0x0022c9d9 mono32`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717 [opt]
    frame #5: 0x0022c7bd mono32`start_wrapper(data=<unavailable>) + 29 at threads.c:764 [opt]
    frame #6: 0x002e69bd mono32`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92 [opt]
    frame #7: 0x9b61f780 libsystem_pthread.dylib`_pthread_body + 138
    frame #8: 0x9b61f6f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #9: 0x9b61cf7a libsystem_pthread.dylib`thread_start + 34

  thread #4: tid = 0x4ef0, 0x912247fa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x912247fa libsystem_kernel.dylib`kevent_qos + 10
    frame #1: 0x9c56d7ea libdispatch.dylib`_dispatch_mgr_invoke + 234
    frame #2: 0x9c56d3be libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #5: tid = 0x4ef1, 0x91223646 libsystem_kernel.dylib`__recvfrom + 10, name = 'tid_1507'
    frame #0: 0x91223646 libsystem_kernel.dylib`__recvfrom + 10
    frame #1: 0x9ccaf9df libsystem_c.dylib`recv$UNIX2003 + 55
    frame #2: 0x0016e328 mono32`socket_transport_recv(buf=<unavailable>, len=<unavailable>) + 168 at debugger-agent.c:1129 [opt]
    frame #3: 0x0015f0d3 mono32`debugger_thread [inlined] transport_recv(len=11) + 29 at debugger-agent.c:1514 [opt]
    frame #4: 0x0015f0b6 mono32`debugger_thread(arg=0x00000000) + 1494 at debugger-agent.c:9617 [opt]
    frame #5: 0x002e69bd mono32`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92 [opt]
    frame #6: 0x9b61f780 libsystem_pthread.dylib`_pthread_body + 138
    frame #7: 0x9b61f6f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #8: 0x9b61cf7a libsystem_pthread.dylib`thread_start + 34

  thread #6: tid = 0x4f2e, 0x91223422 libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_ae03'
    frame #0: 0x91223422 libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x9b61fc62 libsystem_pthread.dylib`_pthread_mutex_lock_wait + 99
    frame #2: 0x9b61d26e libsystem_pthread.dylib`_pthread_mutex_lock_slow + 277
    frame #3: 0x9b61d13d libsystem_pthread.dylib`pthread_mutex_lock + 138
    frame #4: 0x01e34273 libmono-urho.dylib`Urho3D::Mutex::Acquire() + 19
    frame #5: 0x01e433de libmono-urho.dylib`Urho3D::WorkQueue::ProcessItems(unsigned int) + 46
    frame #6: 0x01e43791 libmono-urho.dylib`Urho3D::WorkerThread::ThreadFunction() + 33
    frame #7: 0x01e3d571 libmono-urho.dylib`Urho3D::ThreadFunctionStatic(void*) + 17
    frame #8: 0x9b61f780 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x9b61f6f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #10: 0x9b61cf7a libsystem_pthread.dylib`thread_start + 34

  thread #7: tid = 0x4f32, 0x9121c49a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
    frame #0: 0x9121c49a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9121b884 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x903858ac CoreAudio`HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, bool, unsigned int) + 140
    frame #3: 0x9037eab2 CoreAudio`HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 72
    frame #4: 0x9037cf20 CoreAudio`HALC_ProxyIOContext::IOWorkLoop() + 1392
    frame #5: 0x9037c894 CoreAudio`HALC_ProxyIOContext::IOThreadEntry(void*) + 156
    frame #6: 0x903889ec CoreAudio`___ZN19HALC_ProxyIOContextC2Emj_block_invoke + 20
    frame #7: 0x9037c7b9 CoreAudio`HALB_IOThread::Entry(void*) + 71
    frame #8: 0x9b61f780 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x9b61f6f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #10: 0x9b61cf7a libsystem_pthread.dylib`thread_start + 34

  thread #8: tid = 0x4f3c, 0x9121c49a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread'
    frame #0: 0x9121c49a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9121b884 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x94704dc6 CoreFoundation`__CFRunLoopServiceMachPort + 214
    frame #3: 0x947041d1 CoreFoundation`__CFRunLoopRun + 1521
    frame #4: 0x94703976 CoreFoundation`CFRunLoopRunSpecific + 390
    frame #5: 0x947037db CoreFoundation`CFRunLoopRunInMode + 123
    frame #6: 0x99ce5dde AppKit`_NSEventThread + 291
    frame #7: 0x9b61f780 libsystem_pthread.dylib`_pthread_body + 138
    frame #8: 0x9b61f6f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #9: 0x9b61cf7a libsystem_pthread.dylib`thread_start + 34
(lldb) detach

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Process 909 detached
(lldb) quit
Abort trap: 6

Press any key to continue...

Crash running WinForms or WPF in x86 environment

Using VS2015 Express, windows 7 SP1 x86, inside VirtualBox with 2d and 3d acceleration disabled.

An exception of type 'System.BadImageFormatException' occurred in Urho.dll but was not handled in user code

Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

Happens in MainWindow.xaml.cs RunGame line 57.
currentApplication = Urho.Application.CreateInstance(value.Type, appOptions);

Urho.Graphics doesn't contain the member `TakeScreenShot`

I just grabbed a fresh copy of the repo and tried to run it on OS X. Upon building, I got a single error because of this line:

https://github.com/xamarin/urho-samples/blob/master/FeatureSamples/Core/Sample.cs#L309

Here are the error details:

/Users/ben/Desktop/urho-samples/FeatureSamples/Core/Sample.cs(15,15): Error CS1061: Type `Urho.Graphics' does not contain a definition for `TakeScreenShot' and no extension method `TakeScreenShot' of type `Urho.Graphics' could be found. Are you missing an assembly reference? (CS1061) (Urho.Samples)

Navigation sample crashes in real android device

The program crashes when click "Set".
In debug mode, exception is thrown at NavigationMesh.FindPath.

Here is the stack trace for reference:

05-25 12:48:17.943 E/mono-rt ( 8218): Stacktrace:
05-25 12:48:17.943 E/mono-rt ( 8218): 
05-25 12:48:17.943 E/mono-rt ( 8218):   at <unknown> <0xffffffff>
05-25 12:48:17.943 E/mono-rt ( 8218):   at (wrapper managed-to-native) Urho.Navigation.NavigationMesh.urho_navigationmesh_findpath (intptr,Urho.Vector3,Urho.Vector3,int&) <IL 0x0002c, 0xffffffff>
05-25 12:48:17.943 E/mono-rt ( 8218):   at Urho.Navigation.NavigationMesh.FindPath (Urho.Vector3,Urho.Vector3) <IL 0x0000a, 0x0014b>
05-25 12:48:17.943 E/mono-rt ( 8218):   at Urho.Samples.Navigation.SetPathPoint () [0x000b0] in C:\Users\herman.chan\Downloads\urho-samples-master\urho-samples-master\FeatureSamples\Core\15_Navigation\Navigation.cs:289
05-25 12:48:17.943 E/mono-rt ( 8218):   at Urho.Samples.Navigation.MoveCamera (single) [0x001bb] in C:\Users\herman.chan\Downloads\urho-samples-master\urho-samples-master\FeatureSamples\Core\15_Navigation\Navigation.cs:129
05-25 12:48:17.943 E/mono-rt ( 8218):   at Urho.Samples.Navigation.OnUpdate (single) [0x00009] in C:\Users\herman.chan\Downloads\urho-samples-master\urho-samples-master\FeatureSamples\Core\15_Navigation\Navigation.cs:86
05-25 12:48:17.953 E/mono-rt ( 8218):   at Urho.Application.HandleUpdate (Urho.UpdateEventArgs) <IL 0x00028, 0x0020f>
05-25 12:48:17.953 E/mono-rt ( 8218):   at Urho.Engine/<>c__DisplayClass104_0.<SubscribeToUpdate>b__0 (intptr) <IL 0x00019, 0x00103>
05-25 12:48:17.953 E/mono-rt ( 8218):   at Urho.UrhoObject.ObjectCallback (intptr,int,intptr) <IL 0x00014, 0x000ef>
05-25 12:48:17.953 E/mono-rt ( 8218):   at (wrapper native-to-managed) Urho.UrhoObject.ObjectCallback (intptr,int,intptr) <IL 0x00027, 0xffffffff>
05-25 12:48:17.953 E/mono-rt ( 8218):   at <unknown> <0xffffffff>
05-25 12:48:17.953 E/mono-rt ( 8218):   at (wrapper managed-to-native) Urho.Application.Application_Run (intptr) <IL 0x00029, 0xffffffff>
05-25 12:48:17.953 E/mono-rt ( 8218):   at Urho.Application.Run () <IL 0x00006, 0x0004f>
05-25 12:48:17.953 E/mono-rt ( 8218):   at Urho.Droid.UrhoSurface/<>c__DisplayClass3_0.<CreateSurface>b__0 (intptr) <IL 0x00011, 0x00083>
05-25 12:48:17.953 E/mono-rt ( 8218):   at (wrapper native-to-managed) Urho.Droid.UrhoSurface/<>c__DisplayClass3_0.<CreateSurface>b__0 (intptr) <IL 0x0002f, 0xffffffff>

Feature Sample 42 crashes on android (PBRMaterials)

Sample application crashes when i try to set PBR material.
I got an exception:

[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Failed to compile pixel shader PBRLitSolid(IBL PBR):
0:255: P0004: High precision not supported, instead compiling high precision as medium precision
:10240: S0001: Type mismatch in arithmetic operation between 'int' and 'float'. You can omit this exception by subscribing to Urho.Application.UnhandledException event and set Handled property to True.

I'm using Urho.Forms v1.2.21.

Thanks for help!

UWP FeatureSamples error on Windows phone 10 and Window 10

When running UWP FeatureSamples on Windows phone 10 with ARM build on VS2015 :
ERROR : BadImageFormat faulting module name : urho.dll

When running UWP FeatureSamples on Windows 10 with x86 build on VS2015:
ERROR : Missing module name : combase.dll

Is Windows 10 supported by urhosharp?

FaceDetection fails to compile because a UrhoSurface name conflict

Inside MainPage.xaml we have this line: <uwp:UrhoSurface Name="UrhoSurface" ... which is used in MainPage.cs like this: urhoApp = UrhoSurface.Run<UrhoApp>();

As it happens, Urho also has a UrhoSurface class which conflicts with the naming of the xaml control.

It can be easily solved by renaming the control to something else:

<uwp:UrhoSurface Name="UrhoSurfaceCtrl" ...
urhoApp = UrhoSurfaceCtrl.Run<UrhoApp>();

The FeatureSamples project does not compile for UWP with release build mode

The FeatureSamples project does not compile for UWP with release build mode, following error is generated

...\MSBuild\15.0.Net.NetNative\15.0.24211\x64\ilc\IlcInternals.targets(936,5) : error : ILT0042 Array of pointer types are not currently supported: 'Urho.RenderPathCommand*'

In debug mode it works fine.

Cannot open in release Mode, debug mode was fine (Xamarin Android)

Got this error while opening the page contains urho3d on release mode, debug mode was fine.
Urhosharp used : 1.5.2, 1.5.22

[art] art/runtime/thread.cc:1665] Throwing new exception 'no static method "Lorg/libsdl/app/SDLActivity;.audioQuit()V"' with unexpected pending exception: java.lang.NoSuchMethodError: no static method "Lorg/libsdl/app/SDLActivity;.audioInit(IZZI)I"
[art] art/runtime/thread.cc:1665] at int org.libsdl.app.SDLActivity.nativeInit(java.lang.Object, java.lang.String) (SDLActivity.java:-2)
[art] art/runtime/thread.cc:1665] at void org.libsdl.app.SDLMain.run() (SDLActivity.java:950)
[art] art/runtime/thread.cc:1665] at void java.lang.Thread.run() (Thread.java:762)
[art] art/runtime/thread.cc:1665]

Xamarin Developer Portal Metadata

I noticed that these samples are missing some metadata files. If these were added, the samples would be rendered into the developer portal samples gallery here:
https://developer.xamarin.com/samples-all/

You an see some more information in this other sample repository:
https://github.com/xamarin/xamarin-forms-samples#sample-requirements

And here is a very simple example of what one might look like (placed in the same "root" directory of a sample as the README.md):

<?xml version="1.0" encoding="utf-8"?>
<SampleMetadata>
    <ID>f30f07d3-3915-4f12-806e-953f19c85c66</ID>
    <Tags>Xamarin.Forms, Urho</Tags>
    <SupportedPlatforms>iOS, Android, Windows</SupportedPlatforms>
    <Gallery>true</Gallery>
    <Brief>Implemented only for UWP via MediaCapture and FaceDetector API. Video stream is captured and converts to a Texture2D each frame update.</Brief>
</SampleMetadata>

Just generate a new guid, add the relevant tags and supported platforms for the sample, and put in a nice/short Brief text description.

Let me know if you have any questions :)

/cc @conceptdev

UWP crash while running in the emulator, works fine in the desktop.

Getting below error after clicking on any of the menu item. for example hello word

System.DllNotFoundException occurred
HResult=0x80131524
Message=Unable to load DLL 'mono-urho': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=Urho
StackTrace:
at Urho.Sdl.SDL_SetMainReady()
at Urho.UWP.UrhoSurface.Run(Type appType, ApplicationOptions options)
at Urho.Samples.UWP.MainPage.d__10.MoveNext() in C:\Users\Source\Repos\urho-samples\FeatureSamples\UWP\MainPage.xaml.cs:line 45

SamplyGame not working on Android Emulator windows.. Loading of resources

I have tried to port the SamplyGame to Xamarin.Forms, but in both Forms and Urho "normal" in Android resource loading does not seem to work.

1st, It will load the resources (Fonts) in SamplyGame if the "assets folder" is set to null, BUT then all the components cannot load either the materials or model on the "start menu". I have tried forcing a path "data/" on those but not solution.

iOS and Desktop work fine. I have not test it yet on Mac the Android emulator

SamplyGame not working on real android device

I deployed the app onto my Samsung S6, Android 5.1.1, and it is not working correctly.

The graphic freezes, but I think the game logic is running, because soundfx seems correctly.

Is urho on xamarin ready for production use?

FormsSample crash when navigating back

After adding Application.Exit() to the latest FormsSample as discussed in #24, it better handles navigating back, but it still crashes often. Please see a sample crashed application output below, followed by a successful case for comparison. Alternatively, how could the platform specific FeatureSamples be used as part of a Xamarin Forms page (such as using a custom renderer to embed an UrhoSurface)?

FAILURE:
[UrhoSharp] ProxyStop: Releasing context
[AbsListView] viewType is heaer or footer
[art] Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[26,tid=12401,Native,Thread_=0x8eba6800,peer=0x12f6a100,"Thread-64983"]
[art] Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[27,tid=12383,Native,Thread*=0x8bfa8e00,peer=0x12ccb7c0,"Thread-64984"]
[art] Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[28,tid=12381,Native,Thread_=0x8eba8100,peer=0x12cd3460,"Thread-64985"]
Thread finished: #22
Thread finished: #23
[UrhoSharp] ProxyStop: Disposing context
Thread started: #5
Thread started: #24
[Mono] [0x90571930] worker starting
[UrhoSharp] ProxyStop: end
[URHOSHARP] App exited: 0
[Mono] [0x90470930] worker starting
[mono-rt] Stacktrace:
[mono-rt]
[mono-rt]
[mono-rt] Attempting native Android stacktrace:
[mono-rt]
[mono-rt] at +2508811168 [0x1]
[mono-rt] at +2508811168 [0x3]
[mono-rt]
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries
[mono-rt] used by your application.
[mono-rt] =================================================================
[mono-rt]
[libc] Fatal signal 11 (SIGSEGV), code 2, fault addr 0x12c4b400 in tid 12379 (SDLThread)
[] suspend_thread suspend took 202 ms, which is more than the allowed 200 ms

SUCCESS:
[UrhoSharp] ProxyStop: Releasing context
[Mono] DllImport searching in: 'mono-urho' ('libmono-urho.so').
[Mono] Searching for 'RefCounted_ReleaseRef'.
[Mono] Probing 'RefCounted_ReleaseRef'.
[Mono] Found as 'RefCounted_ReleaseRef'.
[art] Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[28,tid=24719,Native,Thread_=0x8dfa3700,peer=0x12d8a340,"Thread-64513"]
[art] Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[29,tid=24705,Native,Thread_=0x8ecf2000,peer=0x12c65100,"Thread-64514"]
Thread finished: #12
[UrhoSharp] ProxyStop: Disposing context
[UrhoSharp] ProxyStop: end
[URHOSHARP] App exited: 0
[SDL] handleNativeExit
Thread finished: #11
[AbsListView] viewType is heaer or footer
[AbsListView] viewType is heaer or footer
[AbsListView] viewType is heaer or footer
[AbsListView] viewType is heaer or footer
[Mono] [0x9459e930] worker finishing
Thread finished: #4
[Mono] [0x935be930] worker finishing
Thread finished: #7

Multiple Page Visits Crashes XAP

Visiting different pages each with an UrhoSurface seems to cause a crash after a few times.

For example if you replace "restartBtn.Clicked += (sender, e) => StartUrhoApp();" in App.cs with "restartBtn.Clicked += (sender, e) => Navigation.PushAsync(new UrhoPage());". After clicking a few times on "Restart", there is a crash with the error below. This also happens if you go back and then return to the page again.

Java.Lang.NullPointerException:
at --- End of managed exception stack trace ---
at java.lang.NullPointerException
at at org.libsdl.app.SDLActivity.handleNativeExit(SDLActivity.java:170)
at at org.libsdl.app.SDLSurface$1.run(SDLSurface.java:164)
at at java.lang.Thread.run(Thread.java:841)

SamplyGame: Lambda Expression is not valid

These two lines are not correct:
public override int MaxHealth => 50;
protected override Vector3 CollisionShapeSize => base.CollisionShapeSize * 4;

I am using VS2013. Any ideas?

James

PreBuilt samples

I'm having serious troubles downloading and installing Visual Studio, due to frequent crashes and failed installations.
Is there any way to have these samples prebuilt for windows?
I'm just curious to see what is UrhoSharp capable of, before digging deeper in development.

Thanks in advance for either.

Bye, Ivano.

iOS FormsSample still crashes on Launch Sample -> Back -> Launch Sample

Using the latest 1.2.8 FormsSample for iOS, it is still consistently crashing when clicking Launch Sample -> Back -> Launch Sample (as reported in #30). This is with a real iPad. Android works fine.

Below is the application output.
2016-12-03 16:03:03.131 FormsSampleiOS[9605:931870] Created 1 worker thread
2016-12-03 16:03:03.148 FormsSampleiOS[9605:931870] Added resource package /private/var/mobile/Containers/Bundle/Application/910F00FE-DE8C-44E3-A503-538D9332980A/FormsSampleiOS.app/CoreData.pak
2016-12-03 16:03:03.203 FormsSampleiOS[9605:931870] Set screen mode 744x724 windowed resizable
2016-12-03 16:03:03.212 FormsSampleiOS[9605:931870] Initialized input
2016-12-03 16:03:03.214 FormsSampleiOS[9605:931870] Initialized user interface
2016-12-03 16:03:03.233 FormsSampleiOS[9605:931870] Initialized renderer
2016-12-03 16:03:03.402 FormsSampleiOS[9605:931870] Set audio mode 44100 Hz stereo interpolated
2016-12-03 16:03:03.404 FormsSampleiOS[9605:931870] Initialized engine
Thread finished: #3
2016-12-03 16:03:18.058 FormsSampleiOS[9605:931870] Created 1 worker thread
2016-12-03 16:03:18.066 FormsSampleiOS[9605:931870] Added resource package /private/var/mobile/Containers/Bundle/Application/910F00FE-DE8C-44E3-A503-538D9332980A/FormsSampleiOS.app/CoreData.pak
2016-12-03 16:03:18.092 FormsSampleiOS[9605:931870] Set screen mode 744x724 windowed resizable
2016-12-03 16:03:18.093 FormsSampleiOS[9605:931870] Initialized input
2016-12-03 16:03:18.094 FormsSampleiOS[9605:931870] Initialized user interface
2016-12-03 16:03:18.101 FormsSampleiOS[9605:931870] Initialized renderer
2016-12-03 16:03:18.103 FormsSampleiOS[9605:931870] Could not initialize audio output
2016-12-03 16:03:18.104 FormsSampleiOS[9605:931870] Initialized engine

Using SubscribeToKeyDown in SamplyGame

SubscribeToKeyDown is depreciated. It is advised that the SubscribeTo API not be used as it will be removed in future version. Please replace with current API use for the same functionality.
You will find it on line 44 of SamplyGame.cs. It needs to be updated for the current version. (It says it was on the commit, but this was missed.)
Not professional, using depreciated APIs in samples.

Physical Based Rendering

For our application we need a rich rendering engine i decided to try out UrhoSharp as i saw that some people had working pbr-pipeline with urho3D. This examples also include some pbr materials example, but it is disabled for Android.

When i make the PBR-Materials example available in Android, calling it results in crash or freezing of the application. The wpf project is working as expected on my laptop.

My questions is, why is as it is? Is this related to some hardware limitation of mobile devices?
Second, if not is it planned to enable this in the near future?

Any suggestion and help how to create a simple PBR renderviewport for an android device are welcome.

Minimal Example using Xamarin.Forms.UWP: scene renders black

Hello everyone!

I'm currently trying to get a working minimal example of an UrhoSurface for Xamarin.Forms.Android and Xamarin.Forms.UWP. The android application is running fine. The UWP application builds without any errors, but the scene renders black (screenshot).

capture

This is my Xamarin.Forms content page:
`using Xamarin.Forms;
using Urho;
using Urho.Forms;

namespace UrhoSharpCrossPlatform
{

public class UrhoPage : ContentPage
{
    UrhoSurface urhoSurface;
    UrhoApplication urhoApp;            

    public UrhoPage()
    {

        urhoSurface = new UrhoSurface();
        urhoSurface.VerticalOptions = LayoutOptions.FillAndExpand;

        Title = " UrhoSharp + Xamarin.Forms";
        Content = new StackLayout
        {
            Padding = new Thickness(12, 12, 12, 40),
            VerticalOptions = LayoutOptions.FillAndExpand,
            Children = {
                new Label { Text = "This is an UrhoSurface!" },
                urhoSurface
            }
        };
    }
    
    protected override async void OnAppearing()
    {
        ApplicationOptions options = new ApplicationOptions(assetsFolder: null);            
        options.Orientation = ApplicationOptions.OrientationType.LandscapeAndPortrait;
        
        urhoApp = await urhoSurface.Show<UrhoApplication>(options);
    }

    protected override void OnDisappearing()
    {
        UrhoSurface.OnDestroy();
        base.OnDisappearing();
    }        
}

}
`

This is my Urho Application:
`using Urho;
using Urho.Gui;

namespace UrhoSharpCrossPlatform
{
public class UrhoApplication : Application
{
Scene scene;
Node plotNode;
Camera camera;
Octree octree;

    public UrhoApplication(ApplicationOptions options = null) : base(options) { }       

    protected override void Start()
    {
        base.Start();
        CreateScene();
        SetupViewport();
    }

    async void CreateScene()
    {
       
        scene = new Scene();
        octree = scene.CreateComponent<Octree>();

        plotNode = scene.CreateChild();
        var baseNode = plotNode.CreateChild().CreateChild();
        var plane = baseNode.CreateComponent<StaticModel>();            
        plane.Model = CoreAssets.Models.Box;

        var cameraNode = scene.CreateChild();
        camera = cameraNode.CreateComponent<Camera>();
        cameraNode.Position = new Vector3(10, 15, 10) / 1.75f;            
        cameraNode.Rotation = new Quaternion(-0.121f, 0.878f, -0.305f, -0.35f);
        
        Node lightNode = cameraNode.CreateChild();
        var light = lightNode.CreateComponent<Light>();
        light.LightType = LightType.Point;
        light.Range = 100;
        light.Brightness = 1.3f;
                    
        var text = new Text();
        text.SetFont(CoreAssets.Fonts.AnonymousPro, 50);
        text.Value = "Text via Urho UI";
        Current.UI.Root.AddChild(text);
    }

    void SetupViewport()
    {
        var renderer = Renderer;
        renderer.SetViewport(0, new Viewport(Context, scene, camera, null));
    }       
}    	

}`

Has anyone an idea what I'm doing wrong here? Or is UrhoSharp not supported for Xamarin.Forms.UWP in general?

Thank you in advance and greetings from Munich! ;)

Nuget Packages are not available

Hi,

I downloaded the ARCore samples and tried to compile, however I got errors stating that the versions are not available. Is there a Package Manager Source that I should be using to get these?

<package id="UrhoSharp" version="1.8.11" targetFramework="monoandroid80" />
<package id="UrhoSharp.ARCore" version="1.8.11" targetFramework="monoandroid80" />

Regards,

Joe

Character Demo crashes in real android device

When moving and jumping the character, the program crashes at HandleNodeCollision and args.Contacts is null.

Call stack:

05-25 14:48:09.076 E/mono    (13004): Unhandled Exception:
05-25 14:48:09.076 E/mono    (13004): System.NullReferenceException: Object reference not set to an instance of an object
05-25 14:48:09.076 E/mono    (13004):   at Urho.Physics.CollisionData..ctor (System.Byte* p) [0x00024] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at Urho.Physics.CollisionData.FromContactData (IntPtr data, Int32 size) [0x00017] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at Urho.UrhoMap.get_CollisionData (IntPtr handle, Int32 stringHash) [0x00009] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at Urho.NodeCollisionEventArgs.get_Contacts () [0x0000b] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at Urho.Samples.Character.HandleNodeCollision (NodeCollisionEventArgs args) [0x00002] in C:\Users\herman.chan\Downloads\urho-samples-master\urho-samples-master\FeatureSamples\Core\18_CharacterDemo\Character.cs:127 
05-25 14:48:09.076 E/mono    (13004):   at Urho.Node+<>c__DisplayClass449_0.<SubscribeToNodeCollision>b__0 (IntPtr x) [0x00012] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at Urho.UrhoObject.ObjectCallback (IntPtr data, Int32 stringHash, IntPtr variantMap) [0x0000e] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at (wrapper native-to-managed) Urho.UrhoObject:ObjectCallback (intptr,int,intptr)
05-25 14:48:09.076 E/mono    (13004):   at (wrapper managed-to-native) Urho.Application:Application_Run (intptr)
05-25 14:48:09.076 E/mono    (13004):   at Urho.Application.Run () [0x00000] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at Urho.Droid.UrhoSurface+<>c__DisplayClass3_0.<CreateSurface>b__0 (IntPtr contextPtr) [0x00011] in <filename unknown>:0 
05-25 14:48:09.076 E/mono    (13004):   at (wrapper native-to-managed) Urho.Droid.UrhoSurface+<>c__DisplayClass3_0:<CreateSurface>b__0 (intptr)
05-25 14:48:09.086 E/mono-rt (13004): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.Physics.CollisionData..ctor (System.Byte* p) [0x00024] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.Physics.CollisionData.FromContactData (IntPtr data, Int32 size) [0x00017] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.UrhoMap.get_CollisionData (IntPtr handle, Int32 stringHash) [0x00009] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.NodeCollisionEventArgs.get_Contacts () [0x0000b] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.Samples.Character.HandleNodeCollision (NodeCollisionEventArgs args) [0x00002] in C:\Users\herman.chan\Downloads\urho-samples-master\urho-samples-master\FeatureSamples\Core\18_CharacterDemo\Character.cs:127 
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.Node+<>c__DisplayClass449_0.<SubscribeToNodeCollision>b__0 (IntPtr x) [0x00012] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.UrhoObject.ObjectCallback (IntPtr data, Int32 stringHash, IntPtr variantMap) [0x0000e] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at (wrapper native-to-managed) Urho.UrhoObject:ObjectCallback (intptr,int,intptr)
05-25 14:48:09.086 E/mono-rt (13004):   at (wrapper managed-to-native) Urho.Application:Application_Run (intptr)
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.Application.Run () [0x00000] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at Urho.Droid.UrhoSurface+<>c__DisplayClass3_0.<CreateSurface>b__0 (IntPtr contextPtr) [0x00011] in <filename unknown>:0 
05-25 14:48:09.086 E/mono-rt (13004):   at (wrapper native-to-managed) Urho.Droid.UrhoSurface+<>c__DisplayClass3_0:<CreateSurface>b__0 (intptr)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.