Script Attributes Improvements

  1. Enabled per script
  2. Tool tip shown as ‘undefined’
  3. Allow for groupings that can be folded up
  4. Foreground/Background color
  5. Button that can call this.userFunction

What do you mean by number 5? You want a button in the editor to execute a function in your script?

Could you describe what you are trying to achieve?

Hello Dave.

One use case would be a “Reset” button that would reset some attributes to default values (or to anything else for that matter), and then to reset an entity to a known state. Specifically I am incrementally changing the local rotation of an object:

this.entity.rotateLocal(this.itsPitch, this.itsYaw, this.itsRoll);

I could add three more attributes that define the default orientation of the Euler angles, a checkbox to determine whether or not to reset it, then test for it in code and call the appropriate functions. Having a button would allow me to call functions without polluting my code. It would provide a cleaner mechanism for testing functionality that hasn’t been fully built up.