The saga continues.
Of course trying to reference paths in the Resources path wouldn't work because Unity turns that into single-file blob. I tried using StreamingResources instead. However, Noesis.GUI.LoadComponent never seems to find the path if I use what I thought was the typical thing:
Noesis.GUI.LoadComponent(this, System.IO.Path.Combine(Application.streamingAssetsPath, "UI/wpf/mainmenu/Top/MainMenuUserControl.xaml"));
The error I see reported matches up to the xaml in both the editor and the game, but the runtime errors that it can't locate it when I do this. Just to lay this out, the exact logged error text:
[noesis] Xaml not found 'C:/coding/learning_unity/game/unity/Assets/StreamingAssets\UI\wpf\mainmenu\Top\MainMenuUserControl.xaml'
UnityEngine.Debug:LogError(Object)
NoesisUnity:UnityLog(Int32, String) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:141)
Noesis.GUI:Noesis_LoadComponent(HandleRef, String)
Noesis.GUI:LoadComponent(Object, String) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:292)
GameWpf.MainMenuUserControl:InitializeComponent() (at Assets/Project/UI/wpf/mainmenu/Top/MainMenuUserControl.xaml.cs:184)
GameWpf.MainMenuUserControl:.ctor() (at Assets/Project/UI/wpf/mainmenu/Top/MainMenuUserControl.xaml.cs:175)
System.Object:lambda_method(Closure)
Noesis.Extend:CreateInstance(IntPtr, IntPtr) (at Assets/NoesisGUI/Plugins/API/Core/Extend.cs:4659)
System.Object:wrapper_native_00007FFDF370E400(HandleRef, Size&, Size&)
Noesis.FrameworkElement:MeasureOverride(Size) (at Assets/NoesisGUI/Plugins/API/Proxies/FrameworkElementExtend.cs:45)
Noesis.FrameworkElement:CallMeasureOverride(Size, MeasureBaseCallback) (at Assets/NoesisGUI/Plugins/API/Proxies/FrameworkElementExtend.cs:89)
Noesis.Extend:FrameworkElementMeasure(IntPtr, Size&, Size&, MeasureBaseCallback) (at Assets/NoesisGUI/Plugins/API/Core/Extend.cs:1949)
Noesis.View:Noesis_View_SetSize(HandleRef, Int32, Int32)
Noesis.View:SetSize(Int32, Int32) (at Assets/NoesisGUI/Plugins/API/Core/View.cs:57)
NoesisXamlEditor:RenderPreview(View, Int32, Int32) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:267)
NoesisXamlEditor:RenderStaticPreview(String, Object[], Int32, Int32) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:241)
UnityEditor.AssetDatabase:SaveAssets()
NoesisPostprocessor:ImportXaml(String, Boolean, Boolean, Boolean&) (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:342)
NoesisPostprocessor:ImportXaml(String, Boolean, Boolean) (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:299)
NoesisPostprocessor:ImportAssets(String[], Boolean, UpdateProgress) (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:78)
NoesisPostprocessor:ImportAllAssets(UpdateProgress) (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:28)
NoesisPostprocessor:ImportAllAssets() (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:15)
NoesisSettingsEditor:OnInspectorGUI(SerializedObject) (at Assets/NoesisGUI/Plugins/Editor/NoesisSettingsEditor.cs:96)
NoesisSettingsEditor:OnInspectorGUI() (at Assets/NoesisGUI/Plugins/Editor/NoesisSettingsEditor.cs:11)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Side note: It seems to turn my slashes into forward slashes no matter what I do. I got the same exact error when I changed them around, had the code built, and reimported all the XAMLs for giggles:
Noesis.GUI.LoadComponent(this, System.IO.Path.Combine(Application.streamingAssetsPath, @"UI\wpf\mainmenu\Top\MainMenuUserControl.xaml"));
I could get it to work in the editor is I didn't use Application.streamingAssetsPath but just referenced it relative to my project root: Assets/StreamingAssets/UI/wpf/mainmenu/Top/MainMenuUserControl.xaml. This doesn't work in the game build and I'm not sure what would when I can't reference the installation streaming asset path.
So I'm getting a lot of vibes here that even streaming paths are a no-go. I have to stub up some object that drags in the assets to get them into the build.