Skip to content

LogicEditor | Creating empty module breaks when not saved

Summary

When creating a new Json it is possible to close the LogicEditor without saving. The Inspector then still shows us as being in edit mode for the "new" json. Clicking on Reopen will give us a KeyNotFoundException.

Steps to reproduce

  1. Create a new module
  2. Close the graph without saving
  3. Reopen the module
  4. The error shown below will be thrown

What is the current bug behavior?

Creating a new module and then not saving it seems to keep the module in the dropdown (likely a dictionary somewhere?) without saving an empty json.

What is the expected correct behavior?

Either the dropdown should no longer show the invalid option or an empty module should be saved.


Version

0.4.3

Build Target

N/A

Mode

Editor


Relevant logs and/or screenshots

KeyNotFoundException: The given key 'abcdef' was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <e40e5a8f982c4b618a930d29f9bd091c>:0)

Possible fixes

Either save the empty module json or remove the unsafed module from the dropdown.