Component that limits visibility of networked objects to the authority client.
Any object with this component on it will only be visible to the client that has been assigned authority for it.
This would be used for spawning a non-player networked object for single client to interact with, e.g. in-game puzzles.
public class NetworkOwnerChecker : NetworkVisibility
Methods| Improve this Doc View Source
Callback used by the visibility system to determine if an observer (player) can see this object.
If this function returns true, the network connection will be added as an observer.
public override bool OnCheckObserver(NetworkConnection conn)
Network connection of a player.
True if the client is the owner of this object.
Overrides| Improve this Doc View Source
Callback used by the visibility system to (re)construct the set of observers that can see this object.
public override void OnRebuildObservers(HashSet<NetworkConnection> observers, bool initialize)
The new set of observers for this object.
True if the set of observers is being built for the first time.