Hi folks,
I have added a Unity dropdown menu, the tickable options of which return a value (0, 1, 2).
I want to assign each number (representing the dropbox options) a unity.gameobject to activate and disable. Sort of as a toggle.
I.e. ticking a box to make an object appear while making the other 2 objects dissapear.
My plan is to to let the dropdown.value decide which FSM event to send.
I.e.
(pseudocode)
if dropdown.value = 0
activate gameobject Nr. 1
deactivate gameobject Nr. 2
deactivate gameobject Nr. 3
if dropdown.value = 1
activate gameobject Nr. 2
deactivate gameobject Nr. 1
deactivate gameobject Nr. 3
etc.
I can also set the FSM to be "recursive" on the activation, so I can turn it into a toggle.
Anyone know a JavaScript for this sort of thing?