Interactable CUA

CodeyChaos

New member
Messages
13
Reactions
2
Points
3
I'm wondering what the limitations are with creating plugins for CUAs?

I've imported a standard 3 option Unity Dropdown UI that does function visually in a VaM scene as expected (menu expands downwards on click and the selected option changes), but I'm guessing it might be a long shot to be able to access dropdown.value? Or even OnDropdownValueChanged, OnDropdownClicked, OnSetActiveChanged? I've tried any way I can think of currently, but my coding knowledge is nothing to write home about.

If none of that is accessible, then how much functionality can be achieved with a CUA? Since the imported Dropdown CUA functions visually when interacted with, then I'm guessing I could do something like import a door that opens on click. If so, then could a plugin execute that function from another Atom?

If the end goal of a functioning UIDropdown Trgger isn't possible (in World Space, not in a plugins Custom UI), then is it possible to use a UISlider in World Space to select items/atoms instead of a float? Like how a slider is sometimes used in a VaM menu UI or plugins Custom UI as an alternative selector for a neighboring dropdown?

Thank you.
 
I'm wondering what the limitations are with creating plugins for CUAs?
Sure, you can import UI from AssetBundle either as CUA or have your plugin spawn the prefab itself. The limitation is that you have to make callback connections from code instead of comfortably setting everything up in the Unity editor.

As an example you could have a look at my Benchmark scene. The UI there is also loaded/spawned from AssetBundle. Basically you just need to know the hierarchy/names of your UI elements.

For the case of the door, you probably would want a plugin (placed on the door atom) that offers triggers for opening/closing the door. Then you could control it through regular VaM triggers from whereever you like in your scene.
 
Thanks very much for the info.

I'll keep trying to figure out why my plugin scripts aren't working to trigger a function from the dropdown value now I know it can be done. I was just starting to think I was going round in circles trying to achieve the impossible.

Hopefully VaM is planning to add dropdown triggers in future so we can create cleaner UIs natively.
 
Back
Top Bottom