Hot Reload in Unity
Hi, I'm evaluating the trial version of Noesis and having trouble getting hot reload working in Unity. I'm on Unity 2022.3.13f1 and have also tried 2022.3.29f1 (latest LTS).
I created an empty project, added the Noesis package, and imported a few samples. For instance, the Buttons sample. Running the scene in the editor works fine.
I have Visual Studio Code open with MainWindow.xaml. I change something simple, like a color, and save. The UI in the running scene does not update based on this change.
Exiting Play mode and restarting also does not update to reflect the changes in the xaml. Only if I save the file while outside of Play mode do my changes get reflected when running.
Here's a video demonstrating this process.
Appreciate any advice what I might be doing wrong.
I created an empty project, added the Noesis package, and imported a few samples. For instance, the Buttons sample. Running the scene in the editor works fine.
I have Visual Studio Code open with MainWindow.xaml. I change something simple, like a color, and save. The UI in the running scene does not update based on this change.
Exiting Play mode and restarting also does not update to reflect the changes in the xaml. Only if I save the file while outside of Play mode do my changes get reflected when running.
Here's a video demonstrating this process.
Appreciate any advice what I might be doing wrong.
Re: Hot Reload in Unity
What option do you have in Edit=>Preferences=>General=>Script Changes While Playing ?
You should have "Recompile And Continue Playing"
If you have something different, any change to any asset (not only XAMLs) won't reload while in play mode.
You should have "Recompile And Continue Playing"
If you have something different, any change to any asset (not only XAMLs) won't reload while in play mode.
Re: Hot Reload in Unity
Yep, good call. I do have it set to "Recompile And Continue Playing".
Re: Hot Reload in Unity
Are textures reloading correctly?
Re: Hot Reload in Unity
I installed the Quest Log sample and tried modifying the background image while running. I got the same result as before. It didn't hot reload the background after changing MainWindow.xaml.
Re: Hot Reload in Unity
Could you please check the following things?
1. Is hot-reloading working in Unity? Like, are you able to recompile a script while in play mode or change a texture (not a NoesisGUI texture) in the 3D-scene?
2. Project Settings => NoesisGUI => Editor Settings => Reload Enabled should be 'True' (the default value)
3. In NoesisPostprocessor.cs, if you uncomment the first line (//#define DEBUG_IMPORTER) you should get debug messages whenever any XAML is reported as changed by Unity. Are you getting this message? If not, this indicated that Unity is not reporting changes while in Play mode because there is a setting disabling that.
1. Is hot-reloading working in Unity? Like, are you able to recompile a script while in play mode or change a texture (not a NoesisGUI texture) in the 3D-scene?
2. Project Settings => NoesisGUI => Editor Settings => Reload Enabled should be 'True' (the default value)
3. In NoesisPostprocessor.cs, if you uncomment the first line (//#define DEBUG_IMPORTER) you should get debug messages whenever any XAML is reported as changed by Unity. Are you getting this message? If not, this indicated that Unity is not reporting changes while in Play mode because there is a setting disabling that.
Re: Hot Reload in Unity
I tried installing an older version of Unity, and hot reload works fine. So maaaybe it's a Unity thing? Based on the discussion here I went back to 2021.3.5f1. I haven't done a bisect to find out what versions do and don't work (or if the problem is actually something else).
I'll be digging into this a bit more in the next week or so.
I'll be digging into this a bit more in the next week or so.
Re: Hot Reload in Unity
Also, to partially answer your question, reloading of scripts was also not working for me in 2022.3.13f1. That's what made me go searching for possible reasons/solutions when I came across that Reddit thread.
Re: Hot Reload in Unity
Thanks for the update, this is definitely an issue on Unity.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest