diff --git a/docs/basics/networkobject.md b/docs/basics/networkobject.md index bd46d8f67..a2c49ea2b 100644 --- a/docs/basics/networkobject.md +++ b/docs/basics/networkobject.md @@ -112,10 +112,12 @@ Refer to the [NetworkSceneManager active scene synchronization](../scenemanageme ![image](/img/SceneMigrationSynchronization.png) -Similar to `NetworkObject.ActiveSceneSynchronization`, this property automatically synchronizes client-side NetworkObject instances that are migrated to a scene via [`SceneManager.MoveGameObjectToScene`](https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.MoveGameObjectToScene.html) on the host or server side. This can be useful if you have a specific scene you wish to migrate NetworkObject instances to that is not the currently active scene. +Similar to [`NetworkObject.ActiveSceneSynchronization`](#active-scene-synchronization), [`NetworkObject.SceneMigrationSynchronization`](https://docs.unity3d.com/Packages/com.unity.netcode.gameobjects@latest?subfolder=/api/Unity.Netcode.NetworkObject.html#Unity_Netcode_NetworkObject_SceneMigrationSynchronization) automatically synchronizes client-side NetworkObject instances that are migrated to a scene via [`SceneManager.MoveGameObjectToScene`](https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.MoveGameObjectToScene.html) on the host or server side. This can be useful if you have a specific scene you wish to migrate NetworkObject instances to that is not the currently active scene. -:::info -`NetworkObject.ActiveSceneSynchronization` can be used with `NetworkObject.SceneMigrationSynchronization` as long as you take into consideration that if you migrate a NetworkObject into a non-active scene via `SceneManager.MoveGameObjectToScene` and then later change the active scene, then the NetworkObject instance will be automatically migrated to the newly set active scene. +`NetworkObject.ActiveSceneSynchronization` can be used with `NetworkObject.SceneMigrationSynchronization` as long as you take into consideration that if you migrate a NetworkObject into a non-active scene via `SceneManager.MoveGameObjectToScene` and later change the active scene, then the NetworkObject instance will be automatically migrated to the newly set active scene. + +:::warning +Scene migration synchronization is enabled by default. For NetworkObjects that don't require it, such as those that generate static environmental objects like trees, it's recommended to disable scene migration synchronization to avoid additional processing overheads. ::: ## Additional resources diff --git a/docs/basics/scenemanagement/client-synchronization-mode.md b/docs/basics/scenemanagement/client-synchronization-mode.md index e69d66e88..5c6cd9f0e 100644 --- a/docs/basics/scenemanagement/client-synchronization-mode.md +++ b/docs/basics/scenemanagement/client-synchronization-mode.md @@ -5,7 +5,7 @@ sidebar_label: Client synchronization mode --- ## Introduction -Client synchronization occurs when immediately after a client connects to a host or server and the connection is approved. During the client synchronization process, the server will determine everything that a client might need to know about in order to join an in progress network session (networked game session). Netcode for GameObjects provides you with the ability to select the client synchronization mode that best suits your project's needs. During client synchronization a client will automatically set its local client synchronization mode to match that of the server or host setting. +Client synchronization occurs when immediately after a client connects to a host or server and the connection is approved. During the client synchronization process, the server will determine everything that a client might need to know about in order to join an in-progress network session (networked game session). Netcode for GameObjects provides you with the ability to select the client synchronization mode that best suits your project's needs. During client synchronization a client will automatically set its local client synchronization mode to match that of the server or host setting. The client synchronization mode should be set when the server or host is first provided via the `NetworkSceneManager.SetClientSynchronizationMode` method that takes a [`LoadSceneMode`](https://docs.unity3d.com/ScriptReference/SceneManagement.LoadSceneMode.html) value as a parameter. Each client synchronization mode behaves in a similar way to loading a scene based on the chosen `LoadSceneMode`. diff --git a/docusaurus.config.js b/docusaurus.config.js index 20f607748..a0d9ba46b 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -344,7 +344,7 @@ module.exports = { lastVersion: "current", versions: { current: { - label: "2.2.0", + label: "2.2.1", path: "current", }, "2.1.0": { diff --git a/mppm/about.md b/mppm/about.md index b60e34013..6cfe6ece1 100644 --- a/mppm/about.md +++ b/mppm/about.md @@ -8,7 +8,7 @@ Use Multiplayer Play Mode to test multiplayer functionality within the Unity Edi ## Compatibility -Multiplayer Play Mode version 1.1.0 is compatible with Unity Editor versions 6000.0.3f1 or later. +Multiplayer Play Mode version 1.3.0 is compatible with Unity Editor versions 6000.0.22f1 or later. ## Multiplayer Play Mode terminology @@ -27,7 +27,7 @@ Multiplayer Play Mode has some inherent technical limitations, specifically arou The Unity Editor and Virtual Players require a lot of system resources, so you shouldn't use Multiplayer Play Mode at scale. Multiplayer Play Mode is designed for small-scale, local testing environments that can only support up to four total Players (the main Editor Player and three Virtual Players). ### Authoring -You can't create or change the properties of GameObjects in a Virtual Player. Instead, use the main Editor Player to make changes and a Virtual Player to test multiplayer functionality. Any changes you make in Play Mode in the main Editor Player reset when you exit Play Mode. +You can't create or change the properties of GameObjects in a Virtual Player. Instead, use the main Editor Player to make changes and a Virtual Player to test multiplayer functionality. Any changes you make in Play Mode in the main Editor Player reset when you exit Play Mode. :::note You can't access any main Editor Player functionality from Virtual Players. ::: diff --git a/mppm_versions.json b/mppm_versions.json index 6f76ee200..e68701584 100644 --- a/mppm_versions.json +++ b/mppm_versions.json @@ -1,5 +1,4 @@ [ - "1.2.0", "current", "1.2.0", "1.1.0", diff --git a/sidebarsTools.js b/sidebarsTools.js index fb59c57f3..8c76bea62 100644 --- a/sidebarsTools.js +++ b/sidebarsTools.js @@ -34,12 +34,12 @@ module.exports = { }, { "type": "doc", - "id": "profiler" + "id": "multiplayer-tools-window" }, { "type": "doc", - "id": "multiplayer-tools-window" - }, + "id": "profiler" + }, { "type": "doc", "id": "RNSM" @@ -52,6 +52,10 @@ module.exports = { "type": "doc", "id": "netscenevis" }, + { + "type": "doc", + "id": "hierarchy-network-debug" + }, { "collapsed": true, "type": "category", diff --git a/static/img/tools/HierarchyOverlayAndNetSceneVis.png b/static/img/tools/HierarchyOverlayAndNetSceneVis.png new file mode 100644 index 000000000..5325c072d Binary files /dev/null and b/static/img/tools/HierarchyOverlayAndNetSceneVis.png differ diff --git a/static/img/tools/HierarchyOverlayOn.png b/static/img/tools/HierarchyOverlayOn.png new file mode 100644 index 000000000..072557c31 Binary files /dev/null and b/static/img/tools/HierarchyOverlayOn.png differ diff --git a/static/img/tools/tools-window-1.png b/static/img/tools/tools-window-1.png index e90280454..85b085f7e 100644 Binary files a/static/img/tools/tools-window-1.png and b/static/img/tools/tools-window-1.png differ diff --git a/tools/about.md b/tools/about.md index f951bb976..4558efc7b 100644 --- a/tools/about.md +++ b/tools/about.md @@ -12,5 +12,6 @@ The Multiplayer Tools package provides a variety of tools to analyze, debug, and | | [Network Simulator](network-simulator.md) | | | [Runtime Network Stats Monitor](runtime-stats-monitor.md) | | | [Network Scene Visualization](network-scene-vis.md) | +| | [Hierarchy Network Debug View](hierarchy-network-debug.md) | The [Multiplayer Tools Window](tools-window.md) provides convenient access to all the tools mentioned above. \ No newline at end of file diff --git a/tools/hierarchy-network-debug.md b/tools/hierarchy-network-debug.md new file mode 100644 index 000000000..72edac393 --- /dev/null +++ b/tools/hierarchy-network-debug.md @@ -0,0 +1,25 @@ +--- +id: hierarchy-network-debug +title: Hierarchy Network Debug View +--- + +The Hierarchy Network Debug View allows you to visually identify ownership of networked objects in your Unity project. + +## Requirements + +* Unity Editor version 6 or later. +* Multiplayer Tools package version 2.2.1 or later. + +## Using the Hierarchy Network Debug View + +You can enable the Hierarchy Network Debug View by navigating to **Window** > **Multiplayer Tools** and selecting **Enable** next to it in the list of tools. + +When enabled, it provides an overlay on the right-hand side of your **Hierarchy** window that identifies which objects are networked (with a small network cube logo). + +When you enter Play mode it also shows who owns the object (client ID), and whether the current client has ownership of this object (purple crown over network logo). This overlay can be particularly useful when working on [distributed authority](https://docs-multiplayer.unity3d.com/netcode/current/terms-concepts/distributed-authority/) multiplayer projects. + +![Screenshot of the Hierarchy Network Debug View enabled](/img/tools/HierarchyOverlayOn.png) + +You can also use the Hierarchy Network Debug View in conjunction with the [Network Scene Visualization tool](network-scene-viz.md). + +![Screenshot of the Hierarchy Network Debug View enabled with Network Scene Visualization tool](/img/tools/HierarchyOverlayAndNetSceneVis.png) diff --git a/tools/tools-window.md b/tools/tools-window.md index 3c202bd04..c87bbc369 100644 --- a/tools/tools-window.md +++ b/tools/tools-window.md @@ -4,7 +4,7 @@ title: Multiplayer Tools Window --- The Multiplayer Tools window provides convenient access to all of the multiplayer tools and their documentation in one place. -In the case where some tools are unavailable because of a missing dependency, an explanatory message is displayed. +In the case where some tools are unavailable because of a missing dependency, an explanatory message is displayed and you can open the Package Manager directly from the Multiplayer Tools Window. You can open the window by navigating to **Window** > **Multiplayer Tools**. diff --git a/versioned_docs/version-1.11.0/basics/networkobject.md b/versioned_docs/version-1.11.0/basics/networkobject.md index da2e72dab..1effe01a4 100644 --- a/versioned_docs/version-1.11.0/basics/networkobject.md +++ b/versioned_docs/version-1.11.0/basics/networkobject.md @@ -169,8 +169,16 @@ Refer to the [NetworkSceneManager active scene synchronization](../basics/scenem ![image](/img/SceneMigrationSynchronization.png) -Similar to `NetworkObject.ActiveSceneSynchronization`, this property automatically synchronizes client-side NetworkObject instances that are migrated to a scene via [`SceneManager.MoveGameObjectToScene`](https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.MoveGameObjectToScene.html) on the host or server side. This can be useful if you have a specific scene you wish to migrate NetworkObject instances to that is not the currently active scene. +Similar to [`NetworkObject.ActiveSceneSynchronization`](#active-scene-synchronization), [`NetworkObject.SceneMigrationSynchronization`](https://docs.unity3d.com/Packages/com.unity.netcode.gameobjects@latest?subfolder=/api/Unity.Netcode.NetworkObject.html#Unity_Netcode_NetworkObject_SceneMigrationSynchronization) automatically synchronizes client-side NetworkObject instances that are migrated to a scene via [`SceneManager.MoveGameObjectToScene`](https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.MoveGameObjectToScene.html) on the host or server side. This can be useful if you have a specific scene you wish to migrate NetworkObject instances to that is not the currently active scene. -:::info -`NetworkObject.ActiveSceneSynchronization` can be used with `NetworkObject.SceneMigrationSynchronization` as long as you take into consideration that if you migrate a NetworkObject into a non-active scene via `SceneManager.MoveGameObjectToScene` and then later change the active scene, then the NetworkObject instance will be automatically migrated to the newly set active scene. +`NetworkObject.ActiveSceneSynchronization` can be used with `NetworkObject.SceneMigrationSynchronization` as long as you take into consideration that if you migrate a NetworkObject into a non-active scene via `SceneManager.MoveGameObjectToScene` and later change the active scene, then the NetworkObject instance will be automatically migrated to the newly set active scene. + +:::warning +Scene migration synchronization is enabled by default. For NetworkObjects that don't require it, such as those that generate static environmental objects like trees, it's recommended to disable scene migration synchronization to avoid additional processing overheads. ::: + +## Additional resources + +- [PlayerObjects and player prefabs](playerobjects.md) +- [NetworkBehaviour](networkbehaviour.md) +- [NetworkVariable](networkvariable.md)