Skip to content

Commit cba01e9

Browse files
fix
Fixing the issue with the missing `OnSpawned` override within `NetworkVariable`.
1 parent 86318a5 commit cba01e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariable.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,5 +407,11 @@ internal override void WriteFieldSynchronization(FastBufferWriter writer)
407407
base.WriteFieldSynchronization(writer);
408408
}
409409
}
410+
411+
internal override void OnSpawned()
412+
{
413+
m_NetworkBehaviour.PostNetworkVariableWrite(true);
414+
base.OnSpawned();
415+
}
410416
}
411417
}

0 commit comments

Comments
 (0)