NetworkAccessorclass
Constructors1
Showing 1 constructors
public NetworkAccessor(Sandbox.GameObject o)
| Parameter | Type | Description |
|---|---|---|
| o | GameObject | — |
No results match this filter.
Methods13
Showing 13 methods
public bool AssignOwnership(Sandbox.Connection channel)
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.
| Parameter | Type | Description |
|---|---|---|
| channel | Connection | — |
bool—Exceptions
| Exception | Condition |
|---|---|
ArgumentNullException | `channel` cannot be null. To clear owner, use `Sandbox.GameObject.NetworkAccessor.DropOwnership` instead. |
public bool ClearInterpolation()
bool—public bool DisableInterpolation()
Disable interpolation for the networked object's transform. Obsolete: 09/12/2025
Obsolete: Use Interpolation Property
bool—public bool DropOwnership()
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.
bool—public bool EnableInterpolation()
Enable interpolation for the networked object's transform. Obsolete: 09/12/2025
Obsolete: Use Interpolation Property
bool—public bool SetOrphanedMode(Sandbox.NetworkOrphaned action)
Set what happens to this networked object when the owner disconnects.
| Parameter | Type | Description |
|---|---|---|
| action | NetworkOrphaned | — |
bool—public bool SetOwnerTransfer(Sandbox.OwnerTransfer option)
Set who can control ownership of this networked object. Only the current owner can change this.
| Parameter | Type | Description |
|---|---|---|
| option | OwnerTransfer | — |
bool—public bool TakeOwnership()
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.
bool—No results match this filter.
Properties14
Showing 14 properties
public bool Sandbox.GameObject.NetworkAccessor.Active { get; set; }
Is this object networked?
bool—public bool Sandbox.GameObject.NetworkAccessor.AlwaysTransmit { get; set; }
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.
bool—public System.Guid Sandbox.GameObject.NetworkAccessor.CreatorId { get; set; }
The Id of the creator of this object
Guid—public Sandbox.NetworkFlags Sandbox.GameObject.NetworkAccessor.Flags { get; set; }
Network flags which describe the behavior of this networked object. Can only be changed by the host after the networked object has been spawned.
public bool Sandbox.GameObject.NetworkAccessor.Interpolation { get; set; }
Whether the networked object's transform is interpolated.
bool—public bool Sandbox.GameObject.NetworkAccessor.IsCreator { get; set; }
Are we the creator of this network object
bool—public bool Sandbox.GameObject.NetworkAccessor.IsOwner { get; set; }
Are we the owner of this network object?
bool—public bool Sandbox.GameObject.NetworkAccessor.IsProxy { get; set; }
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.
bool—public Sandbox.NetworkOrphaned Sandbox.GameObject.NetworkAccessor.NetworkOrphaned { get; set; }
Determines what happens when the owner disconnects.
public Sandbox.Connection Sandbox.GameObject.NetworkAccessor.Owner { get; set; }
Try to get the connection that owns this object. This can and will return null if we don't have information for this connection.
public Sandbox.Connection Sandbox.GameObject.NetworkAccessor.OwnerConnection { get; set; }
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
public System.Guid Sandbox.GameObject.NetworkAccessor.OwnerId { get; set; }
The Id of the owner of this object
Guid—public Sandbox.OwnerTransfer Sandbox.GameObject.NetworkAccessor.OwnerTransfer { get; set; }
Who can control ownership of this networked object?
public Sandbox.GameObject Sandbox.GameObject.NetworkAccessor.RootGameObject { get; set; }
Get the GameObject that is the root of this network object
No results match this filter.