Replies: 2 comments 3 replies
-
Are you sure you want to invest in UrhoSharp? The repository has been archived and nothing good will come out of it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks. I am fed up with this already and will try another 3d solution. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I very much would like to have UrhoSharp working in Maui. UrhoSharp is a 3D system. It was built as a C# version of an open source C++ game engine (Urho3D) for Xamarin Forms.
There is an UrhoSharp.Forms package for direct Xamarin integration via an
UrhoSurface
View, but also there is still a plain UrhoSharp package which should still in theory be able to work with Maui integration: https://www.nuget.org/packages/UrhoSharp/Examples of how UrhoSharp could be used easily in Xamarin are here:
https://www.xamarinhelp.com/introduction-urhosharp-xamarin-forms/
https://www.xamarinhelp.com/urhosharp-3d-moving-object/
I have tested that simple test project tutorial in Xamarin with UrhoSharp.Forms. It is easy to get up and running that way.
But I am struggling to figure out how to get the UrhoSharp package working in Maui. I am trying to get Windows running just as a start but also do need iOS/Android.
Steps I Have Taken:
Start new Maui project and add UrhoSharp package. Current working Project here: https://github.com/jonmdev/Urho-Test/
Built a Maui View called UrhoSurface, Handler called UrhoSurfaceHandler, and platform view type of UrhoSurfacePlatformView here: https://github.com/jonmdev/Urho-Test/blob/main/Urho%20Test/UrhoSurface/UrhoSurface.cs
Copied over the relevant functions from:
https://github.com/xamarin/urho/blob/cfeff3d45eaaee536e978f857c453dde3ec1c7ed/Bindings/UWP/UrhoSurface.cs
https://github.com/xamarin/urho/blob/cfeff3d45eaaee536e978f857c453dde3ec1c7ed/Bindings/Forms.UWP/UwpSurfaceRenderer.cs
https://github.com/xamarin/urho/blob/cfeff3d45eaaee536e978f857c453dde3ec1c7ed/Bindings/Forms/UrhoSurface.cs
Current Status
In Windows, I can at least get it to build but it breaks with a memory error at the line
Urho.Sdl.InitUwp();
sayingSystem.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
I think this is a more general issue though, because if I try to run any related command like
Urho.Sdl.Quit();
anywhere in the code, I get :System.EntryPointNotFoundException: 'Unable to find an entry point named 'SDL_Quit' in DLL 'mono-urho'.'
Running
dumpbin /exports mono-urho.dll
in the debug build folder where thismono-urho.dll
ends up shows these commands are somehow not in the dll even though I presume they should be based on what I'm seeing in Visual Studio?Fixing It
I'm frankly completely lost on this and don't know why it won't run or why these functions aren't in the dll.
If anyone is willing to help me understand what I'm doing wrong for free, I'd appreciate it. If anyone knows what I'm doing wrong or feels they could easily get UrhoSharp working in Maui on these platforms and is interested in any payment, you can let me know too.
I have too many things to do to be going in circles which I am. If someone knows how to solve this, I would appreciate your help. I don't mind paying for help if it's reasonable.
Should this be possible? I feel like it should be. UrhoSharp is netstandard2.0 so I feel it should be compatible, no? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions