View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002239 | NoesisGUI | C++ SDK | public | 2022-01-13 18:10 | 2025-06-09 16:22 |
| Reporter | jsantos | Assigned To | sfernandez | ||
| Priority | normal | Severity | feature | ||
| Status | assigned | Resolution | open | ||
| Product Version | 3.1 | ||||
| Summary | 0002239: Hot-Reloading improvements | ||||
| Description | We are using this ticket as a place holder for all improvements and ideas we have to improve current Hot-Reloading implementation. | ||||
| Platform | Any | ||||
|
Add a virtual method to FrameworkElement equivalent to ConnectEvent for the FindNames, something in the line of:
|
|
|
Consider deprecating Reloaded event in favor of a more friendly cycle of events for the user:
|
|
|
We are also keeping an internal list of "named" elements to avoid dangling pointers on the client that is probably unnecessary as it doesn't cover all scenarios. |
|
|
I understand the desire to encourage users to use DataContext. But I think forcing users to adopt this path when it is not required in WPF, UWP, and prior versions of Noesis is not sensible. I need a mechanism to opt out because data binding is not always the right solution. The targeting system for my game should not use data contexts. The proposed Noesis solution is that I port controls over to an opinionated design or live with runtime breakage each time I modify XAML during Unity playback. A sensible interim solution is an opt out flag, i.e. "Disable Runtime Reload". |
|
|
I think the only way to retain the state is using Data Context. The improvements commented in this ticket are in the line of fixing as much as possible to avoid breakage (not using DataContext). This is the approach closer to WPF also (if you hot-reload in Visual Studio). To understand more about your scenario could you tell us more about why are you editing XAML during play if you don't expect it to reload? Anyway, @sfernandez is is extremely confusing that editing a resource dictionary reload all dependencies and reset the state of all its XAML even when hot-reloading is not supported in ResourceDictionaries, |
|
|
I edit XAML during playback for the same reason I edit code -- to correct bugs and apply fixes. There are scenarios in which I purposefully do not use data context. Is there a Noesis Unity CS file I may modify to disable this behavior? |
|
|
I know, yes, but I am trying to understand, if you want to disable XAML reloading what's the purpose of editing xaml while in Play mode? It will behave exactly as not editing xaml. |
|
|
Hot reload is a great feature that I intend to use but at present this isn't possible. With regard to my daily workflow -- the reason I make changes during runtime is because Unity has a slow iteration time -- this is the time between editor stop and subsequent playback. I could take notes of necessary product changes as I play the game or I can just make the changes directly. Which one seems easier to you? When I am developing I am usually working on multiple changes at once. For each editor iteration, I am likely testing two changes (which can only be confirmed through visual play) and working on new code for a subsequent change. Having Noesis forcibly remove control state which was previously set in the game breaks this development workflow. |
|
|
I have had to disable hot reloading (by modifiying the code) in our project for reasons similar to stonstad. As well as breaking some elements, it was also triggering XAML imports during play, which was frustrating as you have to wait for it to complete before doing anything in the Editor. |
|
|
In 3.1.2 we added two important improvements to Hot-Reloading
We also observed that setting 'Preferences > General > Script Changes While Playing' to 'Recompile After Finished Playing' disables Hot-Reloading (because it disables import for all assets) |
|
I'm not sure this is the case for many Unity versions. I'm running Unity 2021.2.5f1 with Recompile After Finished Playing set and Noesis still hot reloads. See https://issuetracker.unity3d.com/issues/a-false-pup-up-appears-when-modifying-a-script-and-having-recompile-after-finished-playing-set |
|
|
Any updates on whether this will be a supported feature, i.e. disabling hot reload via noesis configuration? |
|
|
We need to discuss about this, but definitely is not happening on 3.1.3 that we plan to release very soon. Could you disable this by code for now? (NoesisPostProcessor.cs) |
|
|
Yes, a work-around is fine. Do I add an Editor.isPlaying check to OnPostprocessAllAssets? |
|
|
yes, something like that should work for now |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2022-01-13 18:10 | jsantos | New Issue | |
| 2022-01-13 18:11 | jsantos | Assigned To | => sfernandez |
| 2022-01-13 18:11 | jsantos | Status | new => assigned |
| 2022-01-13 18:11 | jsantos | Product Version | 3.2.0 => 3.1 |
| 2022-01-13 18:24 | sfernandez | Note Added: 0007733 | |
| 2022-01-13 18:25 | sfernandez | Note Added: 0007734 | |
| 2022-01-13 18:31 | jsantos | Note Added: 0007735 | |
| 2022-01-13 22:05 | stonstad | Note Added: 0007736 | |
| 2022-01-17 11:10 | jsantos | Note Added: 0007738 | |
| 2022-01-17 11:10 | jsantos | Status | assigned => feedback |
| 2022-01-17 16:44 | stonstad | Note Added: 0007740 | |
| 2022-01-17 18:45 | jsantos | Note Added: 0007742 | |
| 2022-01-17 18:45 | jsantos | Status | feedback => assigned |
| 2022-01-17 18:45 | jsantos | Status | assigned => feedback |
| 2022-01-18 15:46 | stonstad | Note Added: 0007744 | |
| 2022-01-19 16:26 | Faerdan | Note Added: 0007748 | |
| 2022-01-20 12:07 | jsantos | Note Added: 0007750 | |
| 2022-01-20 12:07 | jsantos | Status | feedback => assigned |
| 2022-01-20 16:29 | stonstad | Note Added: 0007752 | |
| 2022-02-01 22:49 | stonstad | Note Added: 0007768 | |
| 2022-02-02 12:34 | jsantos | Note Added: 0007769 | |
| 2022-02-02 12:34 | jsantos | Status | assigned => feedback |
| 2022-02-04 15:59 | stonstad | Note Added: 0007778 | |
| 2022-02-07 14:12 | jsantos | Note Added: 0007782 | |
| 2022-02-07 14:12 | jsantos | Status | feedback => assigned |