Adding attributes to script at runtime

Hi, I’m trying to add an enum attribute at runtime to my script, in “initialize” function, to fill its values based on entity children.

Is it possible to force editor to update UI so that enum values can be selected ?

Thanks

Hi @Pouli,

You can not do that with engine and the official API available.

There is an unofficial editor API available that you can potentially use to run logic against the editor. The code can be found in the editor.js script that loads with the editor and is not minified on purpose.

You will have to study and understand how the editor works, but be careful since that API can potentially change.

Thanks a lot !

1 Like