NetworkAccessorclass

objectNetworkAccessor
Namespace
global
Assembly
Sandbox.Engine
Declaration
public class Sandbox.GameObject.NetworkAccessor

Constructors1

Showing 1 constructors

Methods13

Showing 13 methods

public bool AssignOwnership(Sandbox.Connection channel)PUBLIC

Set the owner of this object to the specified `Sandbox.Connection`. Note: whether you can assign ownership of this object depends on the `Sandbox.GameObject.NetworkAccessor.OwnerTransfer` of this networked object.

ParameterTypeDescription
channelConnection
Returns:bool

Exceptions

ExceptionCondition
ArgumentNullException`channel` cannot be null. To clear owner, use `Sandbox.GameObject.NetworkAccessor.DropOwnership` instead.

public bool ClearInterpolation()PUBLIC

Returns:bool

public bool DisableInterpolation()PUBLICOBSOLETE

Disable interpolation for the networked object's transform. Obsolete: 09/12/2025

Obsolete: Use Interpolation Property

Returns:bool

public bool DropOwnership()PUBLIC

Stop being the owner of this object. Will clear the owner so the object becomes controlled by the server, and owned by no-one. Note: whether you can drop ownership of this object depends on the `Sandbox.GameObject.NetworkAccessor.OwnerTransfer` of this networked object.

Returns:bool

public bool EnableInterpolation()PUBLICOBSOLETE

Enable interpolation for the networked object's transform. Obsolete: 09/12/2025

Obsolete: Use Interpolation Property

Returns:bool

public bool SetOrphanedMode(Sandbox.NetworkOrphaned action)PUBLIC

Set what happens to this networked object when the owner disconnects.

ParameterTypeDescription
actionNetworkOrphaned
Returns:bool

public bool SetOwnerTransfer(Sandbox.OwnerTransfer option)PUBLIC

Set who can control ownership of this networked object. Only the current owner can change this.

ParameterTypeDescription
optionOwnerTransfer
Returns:bool

public bool TakeOwnership()PUBLIC

Become the network owner of this object. Note: whether you can take ownership of this object depends on the `Sandbox.GameObject.NetworkAccessor.OwnerTransfer` of this networked object.

Returns:bool

Properties14

Showing 14 properties

public bool Sandbox.GameObject.NetworkAccessor.AlwaysTransmit { get; set; }PUBLICGETSET

Determines whether updates for this networked object are always transmitted to clients. Otherwise, they are only transmitted when the object is determined as visible to each client.

Returns:bool

public System.Guid Sandbox.GameObject.NetworkAccessor.CreatorId { get; set; }PUBLICGETSET

The Id of the creator of this object

Returns:Guid

public Sandbox.NetworkFlags Sandbox.GameObject.NetworkAccessor.Flags { get; set; }PUBLICGETSET

Network flags which describe the behavior of this networked object. Can only be changed by the host after the networked object has been spawned.

Returns:NetworkFlags

public bool Sandbox.GameObject.NetworkAccessor.Interpolation { get; set; }PUBLICGETSET

Whether the networked object's transform is interpolated.

Returns:bool

public bool Sandbox.GameObject.NetworkAccessor.IsCreator { get; set; }PUBLICGETSET

Are we the creator of this network object

Returns:bool

public bool Sandbox.GameObject.NetworkAccessor.IsOwner { get; set; }PUBLICGETSET

Are we the owner of this network object?

Returns:bool

public bool Sandbox.GameObject.NetworkAccessor.IsProxy { get; set; }PUBLICGETSET

Is this object a network proxy? A network proxy is a network object that is not being simulated on the local pc. This means it's either owned by no-one and is being simulated by the host or owned by another client.

Returns:bool

public Sandbox.Connection Sandbox.GameObject.NetworkAccessor.Owner { get; set; }PUBLICGETSET

Try to get the connection that owns this object. This can and will return null if we don't have information for this connection.

Returns:Connection

public Sandbox.Connection Sandbox.GameObject.NetworkAccessor.OwnerConnection { get; set; }PUBLICGETSETOBSOLETE

Try to get the connection that owns this object. This can and will return null if we don't have information for this connection.

Obsolete: Moved to Owner

Returns:Connection

public System.Guid Sandbox.GameObject.NetworkAccessor.OwnerId { get; set; }PUBLICGETSET

The Id of the owner of this object

Returns:Guid

On this page

Constructorspublic NetworkAccessor(Sandbox.GameObject o)Methodspublic System.Boolean AssignOwnership(Sandbox.Connection channel)public System.Boolean ClearInterpolation()public System.Boolean DisableInterpolation()public System.Boolean DropOwnership()public System.Boolean EnableInterpolation()public System.Void Refresh()public System.Void Refresh(Sandbox.Component component)public System.Void Refresh(Sandbox.GameObject descendent)public System.Boolean SetOrphanedMode(Sandbox.NetworkOrphaned action)public System.Boolean SetOwnerTransfer(Sandbox.OwnerTransfer option)public System.Boolean Spawn()public System.Boolean Spawn(Sandbox.Connection owner)public System.Boolean TakeOwnership()Propertiespublic System.Boolean Sandbox.GameObject.NetworkAccessor.Active { get; set; }public System.Boolean Sandbox.GameObject.NetworkAccessor.AlwaysTransmit { get; set; }public System.Guid Sandbox.GameObject.NetworkAccessor.CreatorId { get; set; }public Sandbox.NetworkFlags Sandbox.GameObject.NetworkAccessor.Flags { get; set; }public System.Boolean Sandbox.GameObject.NetworkAccessor.Interpolation { get; set; }public System.Boolean Sandbox.GameObject.NetworkAccessor.IsCreator { get; set; }public System.Boolean Sandbox.GameObject.NetworkAccessor.IsOwner { get; set; }public System.Boolean Sandbox.GameObject.NetworkAccessor.IsProxy { get; set; }public Sandbox.NetworkOrphaned Sandbox.GameObject.NetworkAccessor.NetworkOrphaned { get; set; }public Sandbox.Connection Sandbox.GameObject.NetworkAccessor.Owner { get; set; }public Sandbox.Connection Sandbox.GameObject.NetworkAccessor.OwnerConnection { get; set; }public System.Guid Sandbox.GameObject.NetworkAccessor.OwnerId { get; set; }public Sandbox.OwnerTransfer Sandbox.GameObject.NetworkAccessor.OwnerTransfer { get; set; }public Sandbox.GameObject Sandbox.GameObject.NetworkAccessor.RootGameObject { get; set; }Metadata