We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8e91d1 commit 06ce0adCopy full SHA for 06ce0ad
1 file changed
MLAPI/Core/NetworkedBehaviour.cs
@@ -107,6 +107,12 @@ public NetworkedObject NetworkedObject
107
{
108
_networkedObject = GetComponentInParent<NetworkedObject>();
109
}
110
+
111
+ if (_networkedObject == null)
112
+ {
113
+ throw new NullReferenceException("Could not get NetworkedObject for the NetworkedBehaviour. Are you missing a NetworkedObject component?");
114
+ }
115
116
return _networkedObject;
117
118
0 commit comments