Android runtime xaml file loading
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?
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?
-
-
sfernandez
Site Admin
- Posts: 3222
- Joined:
Re: Android runtime xaml file loading
If the file Default.xaml.nsb cannot be found inside the .apk, then it is impossible to load it....browsed the generated APK and it is also not there.
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.
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?E/Noesis﹕ NoesisError: Resource assets/UI/Views/_Themes/Default.xaml not found.
Re: Android runtime xaml file loading
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.
Can this be confirmed? Now everything loads. Thanks.
-
-
sfernandez
Site Admin
- Posts: 3222
- Joined:
Re: Android runtime xaml file loading
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.
Who is online
Users browsing this forum: No registered users and 4 guests