Skip to content

Commit cf3576c

Browse files
committed
Fixed issue when caching Attributed methods on scene networkedBehaviours
1 parent eb71ede commit cf3576c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public virtual void OnSetLocalVisibility(bool visible)
181181

182182
private void CacheAttributedMethods()
183183
{
184-
if (NetworkingManager.singleton.NetworkConfig.AttributeMessageMode == AttributeMessageMode.Disabled)
184+
if (NetworkingManager.singleton.NetworkConfig != null && NetworkingManager.singleton.NetworkConfig.AttributeMessageMode == AttributeMessageMode.Disabled)
185185
return;
186186

187187
MethodInfo[] methods = GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy);

0 commit comments

Comments
 (0)