using UnityEngine; using Mirror; using System.Collections.Generic; /* Visibility Guide: https://mirror-networking.com/docs/Guides/Visibility.html API Reference: https://mirror-networking.com/docs/api/Mirror.NetworkBehaviour.html */ public class #SCRIPTNAME# : NetworkVisibility { /// /// 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. /// /// Network connection of a player. /// True if the player can see this object. public override bool OnCheckObserver(NetworkConnection conn) { return true; } /// /// Callback used by the visibility system to (re)construct the set of observers that can see this object. /// Implementations of this callback should add network connections of players that can see this object to the observers set. /// /// The new set of observers for this object. /// True if the set of observers is being built for the first time. public override void OnRebuildObservers(HashSet observers, bool initialize) { } }