Skip to content

Commit 54393f3

Browse files
fix: mtt-505 (#493)
This fixes the soft synch issue when running a host or client within the editor.
1 parent a5f0e66 commit 54393f3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

com.unity.multiplayer.mlapi/Editor/PostProcessScene.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ public class NetworkScenePostProcess : MonoBehaviour
1111
[PostProcessScene(int.MaxValue)]
1212
public static void ProcessScene()
1313
{
14+
//If we are in playmode (editor or stand alone) we do not want this to execute
15+
if(Application.isPlaying)
16+
{
17+
return;
18+
}
19+
1420
List<NetworkedObject> traverseSortedObjects = MonoBehaviour.FindObjectsOfType<NetworkedObject>().ToList();
1521

1622
traverseSortedObjects.Sort((x, y) =>
@@ -57,4 +63,4 @@ internal static List<int> TraversedSiblingIndex(this NetworkedObject networkedOb
5763
return paths;
5864
}
5965
}
60-
}
66+
}

0 commit comments

Comments
 (0)