xamarin / urho

Code to integrate with the Urho3D engine
Other
463 stars 122 forks source link

Visual Studio 2019 Community and Xamarin + Urho -- Could not find resource #406

Closed wide-landscape closed 3 years ago

wide-landscape commented 3 years ago

Hello,

Using Visual Studio 2019 Community and Xamarin + Urho, I just started a small app.

I want to display an object (here a sphere) and apply a texture from a .png file. I'm trying to load an image from the resources with this line:

var i = cache.GetImage("Resources/images/world.png");

but I'm getting the following error while running (debug) on Android:

System.Exception: 'Could not find resource Resources/images/world.png. You can omit this exception by subscribing to Urho.Application.UnhandledException event and set Handled property to True.

The whole VS2019 files are available there: https://github.com/wide-landscape/3Dlandscape

Please let me know if you need more details. I would appreciate any suggestion.

Thanks in advance,

James