Undoing var registration

wgsoup

Well-known member
Featured Contributor
Messages
35
Reactions
368
Points
53
Hi everyone,

I'm trying to implement a function in my plugin to show on the UI all the rigidbodies for the selected Atom. This implies that the UI elements have to be destroyed and re-created everytime a new Atom is selected in the dropdown.

Looks like the software is unable to destroy the Toggles and Sliders if the same Atom has been selected already before. I tried adding a random string to the variable name, therefore creating new variables even if the same atom is selected, and seems to work fine.

I believe this may be related to the registration functions (RegisterBool, RegisterFloat... etc), deleting the UI elements doesn't remove the actual variable from the environment. Do you know if there's any way to undo the registration or unset the related jsonstorable?

Thank you, any suggestion is much appreciated.
 
Back
Top Bottom