Can we change the script attributes by the type of an enum?

In the video in Unity, I set the enum to a certain type and also change the interface. Can I do this in PlayCanvas too?

Not sure what you mean here? You can have predefined dropdowns like this:

Kapture 2022-05-24 at 15.21.11

i wish that in the exaple that you send te atlas split disapear when the pcf3 is selected and wil reapeer with 4 more variables if the pcf5 is selected

in my exaple you can see that float and int is changing these are variables in the inspector

Sorry, it’s not clear what is happening in the video?

It sounds like you want to change the data type of value that can be entered?

You can do this without editor validation by having a dropdown of types and at runtime, parse the value by the data type selected (eg int would be using JavaScript parseInt() Method)

@yaustar I believe he wants to change what attributes are visible, based on the selection.
@Timme_Kingma this is currently not possible.

Related issue:

1 Like

yeah exactly that would help me in some general script like an transition script that can switch between int and trigger and will allow me to hide the int value :sweat_smile: