View Issue Details

IDProjectCategoryView StatusLast Update
0002410NoesisGUIUnitypublic2022-11-07 17:13
ReporterRafael Munoz Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status assignedResolutionopen 
Product Version3.1.2 
Target Version3.1.7 
Summary0002410: Triggers are not hot reloaded in some situations
Description

Marking it as mayor may be overkill but hot reload is a key feature for our workflows.

We have observed Interaction.Triggers are not hot reloaded for named Grids ( may happen for other components )
We can workaround it by nesting an unnamed panel inside the one that is not hot-reloading properly.
We confirmed that in Wpf works as expected.

We include a link to an small project that reproduces the issue but in summary.

<StackPanel Grid.Column="0" x:Name="NamedPanel" Background="Red">
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseDown">
<local:LogAction Message="Mouse down on named panel"/>
</b:EventTrigger>
</b:Interaction.Triggers>
..........
</StackPanel>

This stops reporting mouse downs after hot reload, and we can "fix" it by removing x:Name or nesting another unnamed panel

Steps To Reproduce

Open the example project in the following link
https://drive.google.com/file/d/11nuDYhb39AVcdRwHvV_wGMmRm1uV0aPj/view

Unity version: 2020.3.1f1

1.- Play MainScene
2.- Follow the instrucitons to observe that events are reported properly for both cases ( named and unnamed panel)
3.- Perform some change in MainWindow.xaml and save it so it hot reloads.
4.- Follow the instructions to observe that only the events registered in the unnamed panel keep triggering.

Expected: events registered by interaction triggers keep working after hot reload.

PlatformAny

Relationships

duplicate of 0002348 assignedsfernandez Triggers not working after reload in C# 

Activities

jsantos

jsantos

2022-09-07 11:01

manager   ~0008053

Last edited: 2022-09-07 11:03

Hot-reloading is being reimplemented for 3.2. Right now, almost all objects are recreated. We are implementing a more incremental algorithm that tries to keep as much state as possible.

But, thank you for the ticket. We will have a look at it too.

jsantos

jsantos

2022-09-07 11:06

manager   ~0008054

By the way, how important is "hot-reloading" for your workflow? Do yo use it everyday or occasionally? In the new version we are trying to push more teams to use it.

Rafael Munoz

Rafael Munoz

2022-09-07 17:07

reporter   ~0008056

When programming is implementing base functional layout we use it a little less, but after that when designers iterate on the styles, placement, animations we use it a ton.

In fact we have in our code reviews a step just to check if it breaks anything in hot reload.

We had an issue where some things were not restored properly after a hot reload ( involving pure ui state ), and we discovered the hard way that Noesis strategy for hot reload is full destruction and reconstrucion so any purely visual state was lost.

We double checked in wfp that they seem to substitute the only part of the visual tree that changed, if they manage to identify a match, and somehow they keep things like current visual state.
We workaround it by adding additional state to the viewmodel that we probably wouldn't have in wpf.

For me hot-reload was one of the key features to choose noesis, we are not yet iterating "over the wire" on end-user devices but that is also very interesting :)

jsantos

jsantos

2022-09-08 10:38

manager   ~0008057

Thanks for your feedback. The new algorithm we are working on for 3.2 is more similar to WPF, avoiding destruction of objects as much as possible and retaining current state.

Issue History

Date Modified Username Field Change
2022-09-06 11:49 Rafael Munoz New Issue
2022-09-06 11:49 Rafael Munoz Tag Attached: HotReload
2022-09-06 11:49 Rafael Munoz Tag Attached: Unity
2022-09-07 11:01 jsantos Note Added: 0008053
2022-09-07 11:01 jsantos Assigned To => sfernandez
2022-09-07 11:01 jsantos Status new => assigned
2022-09-07 11:01 jsantos Note Edited: 0008053
2022-09-07 11:02 sfernandez Target Version => 3.1.6
2022-09-07 11:02 sfernandez Relationship added duplicate of 0002348
2022-09-07 11:03 jsantos Note Edited: 0008053
2022-09-07 11:06 jsantos Note Added: 0008054
2022-09-07 11:06 jsantos Status assigned => feedback
2022-09-07 17:07 Rafael Munoz Note Added: 0008056
2022-09-07 17:07 Rafael Munoz Status feedback => assigned
2022-09-08 10:38 jsantos Note Added: 0008057
2022-11-07 17:13 sfernandez Target Version 3.1.6 => 3.1.7
2025-10-10 13:29 jsantos Category Unity3D => Unity