GetComponent(s)<T> functions are not defined internally for VRCSDK3 components
Merlin
The generic versions of VRCSDK3 component GetComponent<T> functions are not defined internally and throw runtime exceptions when you attempt to use them. This is only for the VRCSDK3 components, these functions work fine for the built-in Unity components. This is the error I get when attempting to use GetComponentInChildren to get a VRCPickup:
An exception occurred during EXTERN to 'VRCSDK3ComponentsVRCPickup.__GetComponentInChildren__T'.
The generic node '__GetComponentInChildren__T' doesn't support the type VRC.SDK3.Components.VRCPickup; Consider using the non-generic form of this node if it's available
This means that people need to fall back to using GetComponent(typeof(VRCPickup)) currently which isn't much of an issue for single components, but can be difficult to handle for arrays of components since you need to iterate the array and assign each element of a new array of VRCPickup individually from a Component array.
This is partially related to this canny, but is a different issue as the functions just don't have node definitions in the first place: https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/udonbehaviour-specialized-getcomponentst-functions-are-not-defined
Log In
Merlin
Still throws an error in the latest SDK, but it's a different error now:
An exception occurred during EXTERN to 'VRCSDK3ComponentsVRCPickup.__GetComponent__T'.
Parameter Addresses: 0x00000004, 0x00000024, 0x0000004D
The given key was not present in the dictionary.