Allow enabling and disabling of arbitrary Components
tracked
poplopo
Setting components enabled or disabled is restricted to a limited list of component types. Would be most helpful for it to be available for any component type (similar to how VRCTrigger's Set Component Enabled worked in VRCSDK2).
Log In
Genesis
This is what I've been using to manage component states, but as you can see there are lots of unexposed components, some components don't expose their enabled property, and the whole solution is generally pretty awful and could be avoided with UnityEngine.Behaviour.enabled being exposed - https://gist.github.com/NGenesis/39a22821dd26edc1b8e84c1fcbe71df6.
Momo the Monster
tracked
reopening after additional comments clarified the requested behavior.
LefTonbo
currently bulk enabling/disabling (can do in SDK2) is not doable because we cannot use Behaviour[] and Behaviour.enabled.
Momo the Monster
complete
Going to mark this as complete since we now support this for most components. @poplopo - leave a comment with something specific that's missing and I'll reopen it.
Genesis
Momo the Monster: Why is this marked as complete? it is not possible to do reasonably without UnityEngine.Behaviour.enabled being exposed - https://feedback.vrchat.com/vrchat-udon-closed-alpha-bugs/p/unityenginebehaviourenabled-not-exposed
Genesis
UnityEngine.Behaviour.enabled needs to be exposed to allow this: https://feedback.vrchat.com/vrchat-udon-closed-alpha-bugs/p/unityenginebehaviourenabled-not-exposed
Kaj
Is UdonBehaviour.set enabled all that's missing? Or are there more components?
poplopo
Looks like UdonBehaviour doesn't have enabled because it doesn't have an Update function by default. I've learned more about the component functions at least! I'll keep an eye out for other components but maybe the current implementation is as thorough as it can get.