Closed ikuko closed 4 years ago
Merlin has already added a way for us to reference other behaviours without the need for typeof.
As for the exception you are getting when trying to get the component, it’s as it says, method isn’t exposed for the behaviour interface. There is a canny for it, so just got to wait and see what happens there.
But for now, you can do the following; PlayerInfo = UdonSharpBehaviour class
PlayerInfo playerInfo = otherObj.GetComponent<PlayerInfo>();
Int score = playerInfo.score;
This of course won’t prevent Merlin from implementing a “proxy” for it if VRChat doesn’t update their behaviour script to support it. But doing it the way I showed above is the more native way to code
Thank you. I didn't know that this notation could be used. Close ticket
Feature Description: Currently, when T is a built-in type such as GetComponent, it works, but "GetComponent" causes a compile error.
For UdonBehaviour you have to use "GetComponent(Type)" and the code is redundant. I want an implementation that proxies with UdonSharp.