UdonBehaviour specialized GetComponent(s)<T> functions are not defined
Merlin
All Unity types that inherit from Component have specialized GetComponent<T> functions for them that return the correct type of component directly or correct array type in the case of GetComponents<T>(). The signature for getting all components of type Transform is UnityEngineTransform.__GetComponents__TArray, this returns a Transform array.
This is very useful behavior since it means we don't need to convert array types ourselves, but UdonBehaviour does not define any of these specializations so we can't use the specialized versions on it and need to do regular GetComponent(typeof(UdonBehaviour)) which returns a type of Component or Component[] for GetComponents.
It would be nice to have these specializations for UdonBehaviours as well.
Log In