Class NetworkTransform
Synchronizes a transform over the network.
Inheritance
System.Object
NetworkTransform
Assembly: cs.temp.dll.dll
public sealed class NetworkTransform : NetworkComponent, INetworkAuthoritative, INetworkRollbackable
Fields
How many seconds to delay authority transfer for to allow smooth transitions.
Declaration
public float ReceiveAuthorityDelay
Field Value
Type |
Description |
System.Single |
|
Declaration
public float ReceiveDelay
Field Value
Type |
Description |
System.Single |
|
How many seconds to keep received values for.
Declaration
public float ReceiveDuration
Field Value
Type |
Description |
System.Single |
|
Seconds after the last update is received to extrapolate for.
Bigger values make the transform less likely to jitter during lag spikes but can introduce rubber banding.
Declaration
public float ReceiveExtrapolate
Field Value
Type |
Description |
System.Single |
|
Maximum angular velocity difference allowed to interpolate before snapping. Zero to disable.
Declaration
public float ReceiveSnapAngularVelocity
Field Value
Type |
Description |
System.Single |
|
Maximum seconds between two updates still allowed to interpolate before snapping. Zero to disable.
Declaration
public float ReceiveSnapDuration
Field Value
Type |
Description |
System.Single |
|
Maximum distance allowed to interpolate before teleporting. Zero to disable.
Declaration
public float ReceiveSnapPosition
Field Value
Type |
Description |
System.Single |
|
Maximum RectTransform anchor difference allowed to interpolate before snapping. Zero to disable.
Declaration
public float ReceiveSnapRectAnchors
Field Value
Type |
Description |
System.Single |
|
Maximum RectTransform pivot difference allowed to interpolate before snapping. Zero to disable.
Declaration
public float ReceiveSnapRectPivot
Field Value
Type |
Description |
System.Single |
|
Maximum RectTransform size difference allowed to interpolate before snapping. Zero to disable.
Declaration
public float ReceiveSnapRectSizeDelta
Field Value
Type |
Description |
System.Single |
|
Maximum rotation angle allowed to interpolate before teleporting. Zero to disable.
Declaration
public float ReceiveSnapRotation
Field Value
Type |
Description |
System.Single |
|
Maximum scale difference allowed to interpolate before snapping. Zero to disable.
Declaration
public float ReceiveSnapScale
Field Value
Type |
Description |
System.Single |
|
Maximum velocity difference allowed to interpolate before snapping. Zero to disable.
Declaration
public float ReceiveSnapVelocity
Field Value
Type |
Description |
System.Single |
|
RectTransform component to synchronize. Optional.
Declaration
public RectTransform RectTransform
Field Value
Type |
Description |
RectTransform |
|
Rigidbody
Rigidbody component to synchronize. Optional.
Declaration
public Rigidbody Rigidbody
Field Value
Type |
Description |
Rigidbody |
|
Rigidbody2D
Rigidbody2D component to synchronize. Required.
Declaration
public Rigidbody2D Rigidbody2D
Field Value
Type |
Description |
Rigidbody2D |
|
Maximum number of seconds to wait before sending an update.
Declaration
public float SendIntervalMax
Field Value
Type |
Description |
System.Single |
|
Declaration
public float SendIntervalMin
Field Value
Type |
Description |
System.Single |
|
Minimum amount angular velocity is able to change before an update is sent.
Declaration
public float SendThresholdAngularVelocity
Field Value
Type |
Description |
System.Single |
|
Should remote peer extrapolation be taken into account when checking for thresholds.
Declaration
public bool SendThresholdExtrapolate
Field Value
Type |
Description |
System.Boolean |
|
Minimum distance transform is able to move before an update is sent.
Declaration
public float SendThresholdPosition
Field Value
Type |
Description |
System.Single |
|
Minimum RectTransform anchor is able to change before an update is sent.
Declaration
public float SendThresholdRectAnchors
Field Value
Type |
Description |
System.Single |
|
Minimum amount RectTransform pivot is able to change before an update is sent.
Declaration
public float SendThresholdRectPivot
Field Value
Type |
Description |
System.Single |
|
Minimum amount RectTransform size is able to change before an update is sent.
Declaration
public float SendThresholdRectSizeDelta
Field Value
Type |
Description |
System.Single |
|
Minimum amount rotation angle (in radians) is able to change before an update is sent.
Declaration
public float SendThresholdRotation
Field Value
Type |
Description |
System.Single |
|
Minimum amount transform is able to scale before an update is sent.
Declaration
public float SendThresholdScale
Field Value
Type |
Description |
System.Single |
|
Minimum amount velocity is able to change before an update is sent.
Declaration
public float SendThresholdVelocity
Field Value
Type |
Description |
System.Single |
|
Which angular velocity components to synchronize.
Declaration
public NetworkSyncModeVector3 SyncAngularVelocity
Field Value
Declaration
Field Value
Type |
Description |
System.Byte |
|
Synchronize position and rotation in local space.
Declaration
public bool SyncLocalTransform
Field Value
Type |
Description |
System.Boolean |
|
Which method to synchronize in.
Declaration
public NetworkSyncModeMethod SyncMethod
Field Value
Which position components to synchronize.
Declaration
public NetworkSyncModeVector3 SyncPosition
Field Value
Should RectTransform anchorMax be synchronized.
Declaration
public NetworkSyncModeVector2 SyncRectAnchorMax
Field Value
Should RectTransform anchorMin be synchronized.
Declaration
public NetworkSyncModeVector2 SyncRectAnchorMin
Field Value
Should RectTransform pivot be synchronized.
Declaration
public NetworkSyncModeVector2 SyncRectPivot
Field Value
Should RectTransform sizeDelta be synchronized.
Declaration
public NetworkSyncModeVector2 SyncRectSizeDelta
Field Value
Which rotation components to synchronize.
Declaration
public NetworkSyncModeVector3 SyncRotation
Field Value
Which scale components to synchronize.
Declaration
public NetworkSyncModeVector3 SyncScale
Field Value
Which velocity components to synchronize.
Declaration
public NetworkSyncModeVector3 SyncVelocity
Field Value
Transform component to synchronize. Required.
Declaration
public Transform Transform
Field Value
Type |
Description |
Transform |
|
Properties
True if a RectTransform is attached.
Declaration
public bool HasRectTransform { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasRigidbody
True if a rigidbody is attached.
Declaration
public bool HasRigidbody { get; }
Property Value
Type |
Description |
System.Boolean |
|
Send updates to remote peers.
Declaration
public bool IsAuthority { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
Declaration
public override void OnNetworkConnect(Peer peer)
Parameters
Type |
Name |
Description |
Peer |
peer |
|
Overrides
Declaration
public override void OnNetworkDisconnect(Peer peer)
Parameters
Type |
Name |
Description |
Peer |
peer |
|
Overrides
Declaration
public override void OnNetworkMessage(Peer peer, Reader reader, MessageReceived info)
Parameters
Overrides
Declaration
public override void OnNetworkRegister()
Overrides
Declaration
public override bool OnNetworkResend(Peer origin, Peer peer, Reader reader, MessageReceived info)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Update authority on this component.
Declaration
public void SetAuthority(bool authority)
Parameters
Type |
Name |
Description |
System.Boolean |
authority |
Authority to set.
|
Explicit Interface Implementations
Declaration
void INetworkAuthoritative.OnNetworkAuthorityUpdate(bool authority, HostTimestamp timestamp)
Parameters
Type |
Name |
Description |
System.Boolean |
authority |
|
HostTimestamp |
timestamp |
|
Declaration
void INetworkRollbackable.OnNetworkRollbackBegin(HostTimestamp time, Peer peer)
Parameters
Declaration
void INetworkRollbackable.OnNetworkRollbackEnd()
Implements