mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
21acf66190
* feat: NetworkMatchChecker Component * Added docs * feat: Use logger framework for NetworkClient (#1685) * Use logger framework for NetworkClient * Update Assets/Mirror/Runtime/NetworkClient.cs Co-authored-by: vis2k <info@noobtuts.com> * breaking: NetworkVisbility component (#1681) * backup * breaking: NetworkProximityCheck abstract class. Simplifies code, reduces complexity, improves performance because if 10k identities have 10 components each, we don't have to iterate 100k components each time we rebuild observers. * update tests and checkers * DisallowMultipleComponents * fix tests * split OnCheckObserver check * fix tests * syntax * update comment * renamed to NetworkVisibility * forgot to remove comment * breaking: Network Visibility Component * changing namespaces of performance tests (#1689) * Updated to use NetworkVisibility * Updated comments * Updated OnCheckObserver and removed OnSetHostVisibility * tests for OnCheckObserver * adding check for empty guid * tests for changing matchId * RebuildObservers if player left a match * Refactored to make it simpler Co-authored-by: Paul Pacheco <paulpach@gmail.com> Co-authored-by: vis2k <info@noobtuts.com> Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
757 B
757 B
Network Scene Checker
The Network Match Checker component controls visibility of networked objects based on match id.
Any object with this component on it will only be visible to other objects in the same match.
This would be used to isolate players to their respective matches within a single game server instance.
When you create a match, generate and store, in a List for example, a new match id with System.Guid.NewGuid();
and assign the same match id to the Network Scene Checker via GetComponent<NetworkMatchChecker>().matchId
.
Mirror's built-in Observers system will isolate SyncVar's and ClientRpc's on networked objects to only send updates to clients with the same match id.