Adding XAML Dependencies
Posted: 07 Mar 2019, 01:09
I'm not sure if this is a bug. I have a top-level screen (RootContainer.xaml/.cs) that contains multiple user controls. i.e. Control1, Control2, Control3. Initially, I had all three controls present and based on user interaction, I show one of the three controls by changing visibility. These controls are essentially screens.
Since these screens have deep nested hierarchies of content and user controls, I decided to instantiate them as needed and remove them from the visual tree after they are finished. There were no problems.
However, after restarting Unity I am finding that I frequently -- but not always -- get the same error from Noesis.GUI.LoadComponent(...)
So I removed RootContainer from my Noesis view and set CharacterSelectionScreen directly -- and tada, it works! I then switched back to my RootContainer control and everything works. But now the other controls cannot be found.
This feels like a bug -- but I wanted to throw this out there for your consideration just in case it is user error. The version of Noesis I am using is 2.2.0b6.
Since these screens have deep nested hierarchies of content and user controls, I decided to instantiate them as needed and remove them from the visual tree after they are finished. There were no problems.
However, after restarting Unity I am finding that I frequently -- but not always -- get the same error from Noesis.GUI.LoadComponent(...)
Code: Select all
[noesis] Xaml not found 'Assets/User Interface/Screens/Character Selection/CharacterSelectionScreen.xaml'
UnityEngine.Debug:LogError(Object)
NoesisUnity:UnityLog(Int32, String) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:116)
Noesis.GUI:Noesis_LoadComponent()
Noesis.GUI:LoadComponent(Object, String) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:231)
CharacterSelectionScreen:InitializeComponent() (at Assets/User Interface/Screens/Character Selection/CharacterSelectionScreen.cs:34)
CharacterSelectionScreen:.ctor() (at Assets/User Interface/Screens/Character Selection/CharacterSelectionScreen.cs:29)
RootContainer:ShowCharacterSelectionScreen(List`1) (at Assets/User Interface/RootContainer.cs:52)This feels like a bug -- but I wanted to throw this out there for your consideration just in case it is user error. The version of Noesis I am using is 2.2.0b6.