You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to reference an instance of a user-defined UdonSharpBehaviour-dervied class on the left-hand side of the null-coalescing (??) operator causes a U# compiler error.
Example problematic code:
private KaraokeUiBrowser _uiBrowser = null;
public KaraokeUiBrowser UiBrowser
{ get { return _uiBrowser ?? (_uiBrowser = GetComponentInParent<KaraokeUiBrowser>()); } }
(Where KaraokeUiBrowser is a user-defined subclass of UdonSharpBehaviour)
The above code causes the following error to be thrown upon compilation: System.ArgumentException: Cannot implicitly convert type 'KaraokeUiBrowser' to 'UdonBehaviour'
This problem appears to only be triggered when the UdonSharpBehaviour subclass is on the left-hand side of the ?? operator, the right-hand side appears to function as expected.
The text was updated successfully, but these errors were encountered:
Attempting to reference an instance of a user-defined
UdonSharpBehaviour
-dervied class on the left-hand side of the null-coalescing (??
) operator causes a U# compiler error.Example problematic code:
(Where
KaraokeUiBrowser
is a user-defined subclass ofUdonSharpBehaviour
)The above code causes the following error to be thrown upon compilation:
System.ArgumentException: Cannot implicitly convert type 'KaraokeUiBrowser' to 'UdonBehaviour'
This problem appears to only be triggered when the
UdonSharpBehaviour
subclass is on the left-hand side of the??
operator, the right-hand side appears to function as expected.The text was updated successfully, but these errors were encountered: