File tree Expand file tree Collapse file tree 1 file changed +19
-13
lines changed
com.unity.netcode.gameobjects/Runtime/Core Expand file tree Collapse file tree 1 file changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -383,19 +383,7 @@ internal void UnifiedValidation()
383383 SynchronizeTransform = false ;
384384 }
385385
386- // Move the bridge to the top
387- while ( UnityEditorInternal . ComponentUtility . MoveComponentUp ( NetworkObjectBridge ) )
388- {
389- // Keep moving until it can't go higher
390- }
391-
392- // Now move the GhostAdapter to the top so it is above NetworkObjectBridge
393- while ( UnityEditorInternal . ComponentUtility . MoveComponentUp ( GhostAdapter ) )
394- {
395- // Keep moving until it can't go higher
396- }
397-
398- EditorUtility . SetDirty ( gameObject ) ;
386+ EditorApplication . delayCall += SortToTop ;
399387
400388 }
401389 else if ( HadBridge && ! HasGhost && ! NetworkObjectBridge )
@@ -404,6 +392,24 @@ internal void UnifiedValidation()
404392 SynchronizeTransform = true ;
405393 }
406394 }
395+
396+
397+ private void SortToTop ( )
398+ {
399+ // Move the bridge to the top
400+ while ( UnityEditorInternal . ComponentUtility . MoveComponentUp ( NetworkObjectBridge ) )
401+ {
402+ // Keep moving until it can't go higher
403+ }
404+
405+ // Now move the GhostAdapter to the top so it is above NetworkObjectBridge
406+ while ( UnityEditorInternal . ComponentUtility . MoveComponentUp ( GhostAdapter ) )
407+ {
408+ // Keep moving until it can't go higher
409+ }
410+
411+ EditorUtility . SetDirty ( gameObject ) ;
412+ }
407413#endif
408414#endif
409415 /// <summary>
You can’t perform that action at this time.
0 commit comments