User avatar
stonstad
Topic Author
Posts: 241
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Disable Runtime XAML Reload

11 Jan 2022, 19:56

How do I disable runtime reloading of XAML screens and resources while Unity playback is enabled? i.e. if I change a color in an XAML resources file, I *do not* want Noesis to reload screens.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Disable Runtime XAML Reload

12 Jan 2022, 14:21

It is not only reloading, we also check for errors and more things.

Why do you want to disable it?
 
User avatar
stonstad
Topic Author
Posts: 241
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Re: Disable Runtime XAML Reload

12 Jan 2022, 16:08

In 3.0.X, I could modify XAML and it would not affect my running game. In 3.1.x, changing any XAML file during Unity playback causes the runtime XAML to reload, which invalidates invariant state owned by the control. This then causes exceptions and errors which did not occur in 3.0.X.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Disable Runtime XAML Reload

13 Jan 2022, 17:44

In the past, XAML reloading was disabled and almost nobody was using it so we couldn't fix many things in real-world scenarios. We decided to change this in 3.1 as hot-reloading is going to be more and more important in future versions. We have the compromise to prioritize all kind of issues related to hot-reloading.

We recommend moving all your state to the DataContext, that's the easiest solution. If that's not possible we also expose the Reload event to detect when hot-reloading is happening.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Disable Runtime XAML Reload

13 Jan 2022, 18:32

I have just created #2239 to track all issues and ideas for Hot-Reloading

Who is online

Users browsing this forum: Google [Bot], vinick and 79 guests