Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Disappearing changes after reboot or duplication
I'm still writing a blog post about this one because, this takes the cake in terms of broken interactions with the Unity Editor. The Unity Editor will show the content of the Animation Controller additional layers, the new menus items and parameters without any problem after using the tool. However before this patch, cloning any of these assets or restarting the Editor lead to these assets losing their contents. Meaning that after a restart, items added to the menus, parameters and animation controllers layers were lost. This was due to me not marking the modified elements as "Dirty". So even though I explicitly clicked on "Save" in the editor, even though the editor was clearly showing "apparently" non-saved content; without a "dirty" flag, the editor refused to actually save the changes. Also the way the layers are added to the AnimationController are somewhat broken. Currently StateMachine objects are generated in advance, and then attached to layers added to the FX AnimationController. This "works" but generated more issues than anything. I'll try to generate a complete AnimationController and add code to fuse AnimationControllers together in the next updates. This should resolve most of the encountered issues. Meanwhile, this provoked a similar issue as well, since the states and transitions added to these StateMachine were attached to nothing (the StateMachine having no backing storage when the states are added to it). Meaning that the StateMachine would lose its States and Transitions after duplication or reboot. In order to avoid the issue, additional code make sure that each state and transition is clearly saved within the Animation Controller. Still, what a bunch of stupid bugs. Seriously, why does this editor doesn't emit any warning when not saving assets when you explicitly ask for a "Save" to be performed ? Signed-off-by: Voyage <[email protected]>
- Loading branch information