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
I'm posting for the sake of searchability while still using Unity's bug reporting tool until it lands in the issue tracker (https://issuetracker.unity3d.com/) - I'll close it afterward.
NetworkBehaviourReference.TryGet force cast and will throw when the type is not found. It should use as to prevent throwing. networkBehaviour = (T)GetInternal(this, null); -> networkBehaviour = GetInternal(this, null) as T;
Detailed steps to reproduce are in the official bug ticket.
I'm posting for the sake of searchability while still using Unity's bug reporting tool until it lands in the issue tracker (https://issuetracker.unity3d.com/) - I'll close it afterward.
NetworkBehaviourReference.TryGet force cast and will throw when the type is not found. It should use as to prevent throwing.
networkBehaviour = (T)GetInternal(this, null);
->networkBehaviour = GetInternal(this, null) as T;
Detailed steps to reproduce are in the official bug ticket.
Edit:
It landed on the issue tracker:
https://issuetracker.unity3d.com/issues/multiplayer-netcode-for-gameobjects-networkbehaviourreference-tryget-method-throws-error-when-trying-to-get-a-component-that-i
The text was updated successfully, but these errors were encountered: