mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
71c0d3b2ee
* Create Network Scene Checker Component * Move objects to subscene in client * Remove OnStartClient * Rewritten with static dictionary * Updated doc * renamed image * Replaced image * fixed image name * Changed to short-circuit return in Update * Changed to using string for key since additive scenes may be unloaded * Added null check * Removed commented line * Update Assets/Mirror/Components/NetworkSceneChecker.cs Co-Authored-By: vis2k <info@noobtuts.com> * Moved initializer to declaration * Removed [Scene, SerializeField] Co-authored-by: vis2k <info@noobtuts.com>
17 lines
1.1 KiB
Markdown
17 lines
1.1 KiB
Markdown
# NetworkSceneChecker
|
||
|
||
The Network Scene Checker component controls the visibility of game objects for network clients, based on which scene they're in.
|
||
|
||
![Network Scene Checker component](NetworkSceneChecker.png)
|
||
|
||
- **Force Hidden**
|
||
Tick this checkbox to hide this object from all players.
|
||
|
||
With the Network Scene Checker, a game running on a client doesn’t have information about game objects that are not visible. This has two main benefits: it reduces the amount of data sent across the network, and it makes your game more secure against hacking.
|
||
|
||
This component would typically be used when the server has several subscenes loaded and needs to isolate networked objects to the subscene they're in.
|
||
|
||
A game object with a Network Scene Checker component must also have a Network Identity component. When you create a Network Scene Checker component on a game object, Mirror also creates a Network Identity component on that game object if it does not already have one.
|
||
|
||
Scene objects with a Network Scene Checker component are disabled when they're not in the same scene, and spawned objects are destroyed when they're not in the same scene.
|