snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.62k stars 289 forks source link

Undo delete of a command is incomplete / error prone #814

Open stevehalliwell opened 4 years ago

stevehalliwell commented 4 years ago

Reported from community on forum, link, and gitter "@stevehalliwell Worked out it was a bug within Fungus where I deleted a block, then hit Undo and it broke it all. As for versions, Unity 2018.4.2f1 and the version of Fungus before the last."

Unclear on simple Repro at this time. Test of deleting a command in a block and undo is not displaying this erroneous behaviour. Further information and testing required.

ianicmathieu commented 4 years ago

I get this all the time.

Create a node. Add a Say command. Delete it Undo. Select the Say command.

Result: In the inspector, all the information about the say command are no longer displayed ( Character, Story text, etc, do not appear ) On my side, it did not break my flowchart, I just remove those invalid command blocks and the build seems to works fine.

stevehalliwell commented 4 years ago

For further follow up. There is most likely older editor code that is susceptible to issues related to https://forum.unity.com/threads/saving-prefab-after-contextmenu-change.599389/ and Existing uses of EditorUtil.SetDirty need updating as do calls from editor code into gameobjects beyond serialisedobjects/properties.