- Home /
Restoring the state of an object on recompile during runtime
When the game is playing, I save changes to a script and return to Unity, it compiles the changes and continues where it left off. A fantastic feature except for one issue: private values that I initialize are lost and I am spammed with NullReferenceExceptions.
Is there any opportunity to save the state of my objects prior to recompile?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612204955im_/https://answers.unity.com/themes/thub/images/avi.jpg)