File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
MLAPI/MonoBehaviours/Core Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,8 @@ private void OnDestroy()
211211 private bool [ ] dirtyFields ;
212212 internal void SyncVarInit ( )
213213 {
214+ if ( syncVarInit )
215+ return ;
214216 syncVarInit = true ;
215217 FieldInfo [ ] sortedFields = GetType ( ) . GetFields ( BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . FlattenHierarchy | BindingFlags . Instance ) . OrderBy ( x => x . Name ) . ToArray ( ) ;
216218 for ( byte i = 0 ; i < sortedFields . Length ; i ++ )
Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ internal void InvokeBehaviourNetworkSpawn()
186186 {
187187 childNetworkedBehaviours [ i ] . NetworkStart ( ) ;
188188 childNetworkedBehaviours [ i ] . SyncVarInit ( ) ;
189+ childNetworkedBehaviours [ i ] . networkedStartInvoked = true ;
189190 }
190191 }
191192 }
You can’t perform that action at this time.
0 commit comments