Closed ikuko closed 3 years ago
I will look at avoiding the check in editor builds for 1.0, but as-is I do not want to add runtime overhead GetComponent(s) which is already one of the most expensive things for the sake of an edge case error that VRC shouldn't have there in the first place.
An error log may be output when trying to get a user class type component with GetComponent(s).
The reason for this is that GetProgramVariable() is trying to get "__refl_const_intnl_udonTypeID" for Udon other than UdonSharp. I don't know when it started behaving this way, but GetProgramVariable() now outputs an error log when it tries to get a non-existent variable. GetProgramVariableType() does not output an error if you specify a non-existent variable, so you can use it to verify the existence of the variable. The error can be avoided by proceeding only when the type can be obtained. This problem is limited to editors, but it is very annoying because the error is always displayed.
error log:
example code:
example scene: