Class NetworkProximityChecker | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkProximityChecker

    Component that controls visibility of networked objects for players.

    Any object with this component on it will not be visible to players more than a (configurable) distance away.

    Inheritance
    System.Object
    NetworkBehaviour
    NetworkProximityChecker
    Inherited Members
    NetworkBehaviour.localPlayerAuthority
    NetworkBehaviour.isServer
    NetworkBehaviour.isClient
    NetworkBehaviour.isLocalPlayer
    NetworkBehaviour.hasAuthority
    NetworkBehaviour.netId
    NetworkBehaviour.connectionToServer
    NetworkBehaviour.connectionToClient
    NetworkBehaviour.playerControllerId
    NetworkBehaviour.syncVarDirtyBits
    NetworkBehaviour.syncVarHookGuard
    NetworkBehaviour.SendCommandInternal(NetworkWriter, Int32, String)
    NetworkBehaviour.InvokeCommand(Int32, NetworkReader)
    NetworkBehaviour.SendRPCInternal(NetworkWriter, Int32, String)
    NetworkBehaviour.SendTargetRPCInternal(NetworkConnection, NetworkWriter, Int32, String)
    NetworkBehaviour.InvokeRPC(Int32, NetworkReader)
    NetworkBehaviour.SendEventInternal(NetworkWriter, Int32, String)
    NetworkBehaviour.InvokeSyncEvent(Int32, NetworkReader)
    NetworkBehaviour.InvokeSyncList(Int32, NetworkReader)
    NetworkBehaviour.RegisterCommandDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.RegisterRpcDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.RegisterEventDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.RegisterSyncListDelegate(Type, Int32, NetworkBehaviour.CmdDelegate)
    NetworkBehaviour.SetSyncVarGameObject(GameObject, GameObject, UInt32, NetworkInstanceId)
    NetworkBehaviour.SetSyncVar<T>(T, T, UInt32)
    NetworkBehaviour.SetDirtyBit(UInt32)
    NetworkBehaviour.ClearAllDirtyBits()
    NetworkBehaviour.OnSerialize(NetworkWriter, Boolean)
    NetworkBehaviour.OnDeserialize(NetworkReader, Boolean)
    NetworkBehaviour.PreStartClient()
    NetworkBehaviour.OnNetworkDestroy()
    NetworkBehaviour.OnStartServer()
    NetworkBehaviour.OnStartClient()
    NetworkBehaviour.OnStartLocalPlayer()
    NetworkBehaviour.OnStartAuthority()
    NetworkBehaviour.OnStopAuthority()
    NetworkBehaviour.GetNetworkChannel()
    NetworkBehaviour.GetNetworkSendInterval()
    Namespace: UnityEngine.Networking
    Syntax
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public class NetworkProximityChecker : NetworkBehaviour

    Fields

    checkMethod

    Which method to use for checking proximity of players.

    Declaration
    public NetworkProximityChecker.CheckMethod checkMethod
    Field Value
    Type Description
    NetworkProximityChecker.CheckMethod

    forceHidden

    Flag to force this object to be hidden for players.

    If this object is a player object, it will not be hidden for that player.

    Declaration
    public bool forceHidden
    Field Value
    Type Description
    System.Boolean

    visRange

    The maximim range that objects will be visible at.

    Declaration
    public int visRange
    Field Value
    Type Description
    System.Int32

    visUpdateInterval

    How often (in seconds) that this object should update the set of players that can see it.

    Declaration
    public float visUpdateInterval
    Field Value
    Type Description
    System.Single

    Methods

    OnCheckObserver(NetworkConnection)

    Declaration
    public override bool OnCheckObserver(NetworkConnection newObserver)
    Parameters
    Type Name Description
    NetworkConnection newObserver
    Returns
    Type Description
    System.Boolean
    Overrides
    NetworkBehaviour.OnCheckObserver(NetworkConnection)

    OnRebuildObservers(HashSet<NetworkConnection>, Boolean)

    Declaration
    public override bool OnRebuildObservers(HashSet<NetworkConnection> observers, bool initial)
    Parameters
    Type Name Description
    HashSet<NetworkConnection> observers
    System.Boolean initial
    Returns
    Type Description
    System.Boolean
    Overrides
    NetworkBehaviour.OnRebuildObservers(HashSet<NetworkConnection>, Boolean)

    OnSetLocalVisibility(Boolean)

    Declaration
    public override void OnSetLocalVisibility(bool vis)
    Parameters
    Type Name Description
    System.Boolean vis
    Overrides
    NetworkBehaviour.OnSetLocalVisibility(Boolean)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023