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()
211
211
private bool [ ] dirtyFields ;
212
212
internal void SyncVarInit ( )
213
213
{
214
+ if ( syncVarInit )
215
+ return ;
214
216
syncVarInit = true ;
215
217
FieldInfo [ ] sortedFields = GetType ( ) . GetFields ( BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . FlattenHierarchy | BindingFlags . Instance ) . OrderBy ( x => x . Name ) . ToArray ( ) ;
216
218
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()
186
186
{
187
187
childNetworkedBehaviours [ i ] . NetworkStart ( ) ;
188
188
childNetworkedBehaviours [ i ] . SyncVarInit ( ) ;
189
+ childNetworkedBehaviours [ i ] . networkedStartInvoked = true ;
189
190
}
190
191
}
191
192
}
You can’t perform that action at this time.
0 commit comments