Page 1 of 1

Remove field texttable.

Posted: Tue Oct 20, 2020 2:15 pm
by megadok
Hey Tony!

I am working with text tables on "Editor" and I need to delete fields via script.
I have used,

Code: Select all

 table.RemoveField("string");
but it doesn't work, the field still exists.

Can you help me?

Thank you! :)

Re: Remove field texttable.

Posted: Tue Oct 20, 2020 4:12 pm
by Tony Li
Hi,

That should work. Since you're writing an editor script, are you marking the asset dirty afterward so Unity knows to save your changes? (EditorUtility.SetDirty)

Re: Remove field texttable.

Posted: Tue Oct 20, 2020 5:46 pm
by megadok
The problem was that the field was empty, and therefore it did not delete it.
Thank you Tony! :D