Page 1 of 1

Android runtime xaml file loading

Posted: 12 Jun 2015, 22:19
by herbss
Environment latest Noesis 1.2 with Unity 4.6.

I'm trying to load a xaml file at runtime using the method in C#:
NoesisGUISystem.LoadXaml(xamlFile).

It works on Windows. However on Android it complains with the output message:
E/Noesis﹕ NoesisError: Resource assets/UI/Views/_Themes/Default.xaml not found.

I can find it under the StreamingAssets\NoesisGUI\android\Assets\UI\Views\_Themes after Noesis builds the nsb files.

Is there a bug around the pathing on Android? Note that I opened and browsed the generated APK and it is also not there. Does the xaml need to be referenced somewhere before I can load it?

Re: Android runtime xaml file loading

Posted: 13 Jun 2015, 20:01
by sfernandez
...browsed the generated APK and it is also not there.
If the file Default.xaml.nsb cannot be found inside the .apk, then it is impossible to load it.
But you said that the .nsb is generated for the Android platform in the StreamingAssets folder, and that is very strange because Unity copies everything from that folder inside the assets folder in the .apk.
E/Noesis﹕ NoesisError: Resource assets/UI/Views/_Themes/Default.xaml not found.
Looking at this error maybe is a problem with the lowercase 'assets'. Is it possible that your Unity project has the 'Assets' folder in lowercase?

Re: Android runtime xaml file loading

Posted: 15 Jun 2015, 18:52
by herbss
I managed to get it to work by renaming _Themes to AThemes. I'm suspecting there is a problem with leading underscore character in a folder name.

Can this be confirmed? Now everything loads. Thanks.

Re: Android runtime xaml file loading

Posted: 03 Jul 2015, 20:18
by sfernandez
I confirmed that folders starting with underscore (like in _Themes) are not deployed from StreamingAssets into the .apk, Unity just ignores them, so they must be avoided if they include NoesisGUI resources.