We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63628c7 commit 08f6f99Copy full SHA for 08f6f99
com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs
@@ -79,7 +79,7 @@ protected NetworkVariableBase(
79
public virtual void SetDirty(bool isDirty)
80
{
81
m_IsDirty = isDirty;
82
- if (m_IsDirty)
+ if (m_IsDirty && m_NetworkBehaviour != null)
83
84
m_NetworkBehaviour.NetworkManager.MarkNetworkObjectDirty(m_NetworkBehaviour.NetworkObject);
85
}
0 commit comments