don-tnowe / godot-inspector-extender

Using just comments, add specialized inspectors for your Godot 4 scripts.
MIT License
97 stars 8 forks source link

Multi_array_table values reset to empty when its script changes #14

Open EnigmaEmmy opened 2 months ago

EnigmaEmmy commented 2 months ago

Whenever the script that holds the arrays for a multi_array_table changes (even if it is just adding or removing whitespace), the data in the multi_array_table gets deleted.

Saving, selecting and reselecting the node, and running the game are all fine and the data is saved, but as soon as the script changes, it gets deleted.

Screen Recording 2024-09-03 151458

Tested on 4.3

don-tnowe commented 2 months ago

Funny. Don't even need to edit the script, just saving it breaks the table (or at least, from an external script editor). It also un-breaks the table after another save, if it was empty.

This can be worked around by giving the script's class a @tool attribute (at the top of the script), but use some precautions like blocking `_process()` or custom setters. More observations below.

I will try to investigate more later. For now, please use the workaround.