• Home
  • Tutorials
  • API Documentation
  • Asset Store
Show / Hide Table of Contents
  • SuperNet.Netcode.Compress
    • CompressorDeflate
    • CompressorLZF
    • ICompressor
  • SuperNet.Netcode.Crypto
    • CryptoAES
    • CryptoECDH
    • CryptoRandom
    • CryptoRSA
    • Curve25519
    • ICryptoAuthenticator
    • ICryptoEncryptor
    • ICryptoExchanger
    • ICryptoRandom
  • SuperNet.Netcode.Transport
    • ConnectionRequest
    • DisconnectReason
    • Host
    • HostConfig
    • HostEvents
    • HostStatistics
    • HostTimespan
    • HostTimestamp
    • IHostListener
    • IMessage
    • IMessageListener
    • IPeerListener
    • MessageEvents
    • MessageReceived
    • MessageSent
    • Peer
    • PeerConfig
    • PeerEvents
    • PeerStatistics
  • SuperNet.Netcode.Util
    • Allocator
    • ArrayPool<T>
    • CRC32
    • IPComparer
    • IPResolver
    • IWritable
    • ObjectPool<T>
    • Reader
    • Serializer
    • Writer
  • SuperNet.Unity.Components
    • INetworkAuthoritative
    • INetworkRegisterable
    • INetworkRollbackable
    • NetworkAnimation
    • NetworkAnimator
    • NetworkAuthority
    • NetworkPrefab
    • NetworkRegistrar
    • NetworkSpawner
    • NetworkSyncModeMethod
    • NetworkSyncModeVector2
    • NetworkSyncModeVector3
    • NetworkTransform
  • SuperNet.Unity.Core
    • NetworkComponent
    • NetworkHost
    • NetworkIdentity
    • NetworkIdentityExtensions
    • NetworkManager
  • SuperNet.Unity.Editor
    • NetworkAuthorityEditor
    • NetworkHostEditor
    • NetworkHostEditor.BandwithUnit
    • NetworkIdentityDrawer
    • NetworkManagerEditor
    • NetworkPrefabEditor
    • NetworkSpawnerEditor

Class NetworkTransform

Synchronizes a transform over the network.

Inheritance
System.Object
NetworkComponent
NetworkTransform
Implements
INetworkAuthoritative
INetworkRollbackable
Inherited Members
NetworkComponent.NetworkID
NetworkComponent.IsRegisteredOnNetwork
NetworkComponent.Start()
NetworkComponent.OnDestroy()
NetworkComponent.ResetNetworkID()
NetworkComponent.GetNetworkPeers()
NetworkComponent.Run(Action)
NetworkComponent.Run(Action, Single)
NetworkComponent.RunAsync(Action)
NetworkComponent.SendNetworkMessage(IMessage)
NetworkComponent.SendNetworkMessage(IMessage, Predicate<Peer>)
NetworkComponent.SendNetworkMessage(IMessage, IEnumerable<Peer>)
NetworkComponent.SendNetworkMessage(IMessage, Peer[])
NetworkComponent.OnNetworkUnregister()
NetworkComponent.OnNetworkRegister(NetworkComponent)
NetworkComponent.OnNetworkUnregister(NetworkComponent)
Namespace: SuperNet.Unity.Components
Assembly: cs.temp.dll.dll
Syntax
public sealed class NetworkTransform : NetworkComponent, INetworkAuthoritative, INetworkRollbackable

Fields

ReceiveAuthorityDelay

How many seconds to delay authority transfer for to allow smooth transitions.

Declaration
public float ReceiveAuthorityDelay
Field Value
Type Description
System.Single

ReceiveDelay

Declaration
public float ReceiveDelay
Field Value
Type Description
System.Single

ReceiveDuration

How many seconds to keep received values for.

Declaration
public float ReceiveDuration
Field Value
Type Description
System.Single

ReceiveExtrapolate

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

ReceiveSnapAngularVelocity

Maximum angular velocity difference allowed to interpolate before snapping. Zero to disable.

Declaration
public float ReceiveSnapAngularVelocity
Field Value
Type Description
System.Single

ReceiveSnapDuration

Maximum seconds between two updates still allowed to interpolate before snapping. Zero to disable.

Declaration
public float ReceiveSnapDuration
Field Value
Type Description
System.Single

ReceiveSnapPosition

Maximum distance allowed to interpolate before teleporting. Zero to disable.

Declaration
public float ReceiveSnapPosition
Field Value
Type Description
System.Single

ReceiveSnapRectAnchors

Maximum RectTransform anchor difference allowed to interpolate before snapping. Zero to disable.

Declaration
public float ReceiveSnapRectAnchors
Field Value
Type Description
System.Single

ReceiveSnapRectPivot

Maximum RectTransform pivot difference allowed to interpolate before snapping. Zero to disable.

Declaration
public float ReceiveSnapRectPivot
Field Value
Type Description
System.Single

ReceiveSnapRectSizeDelta

Maximum RectTransform size difference allowed to interpolate before snapping. Zero to disable.

Declaration
public float ReceiveSnapRectSizeDelta
Field Value
Type Description
System.Single

ReceiveSnapRotation

Maximum rotation angle allowed to interpolate before teleporting. Zero to disable.

Declaration
public float ReceiveSnapRotation
Field Value
Type Description
System.Single

ReceiveSnapScale

Maximum scale difference allowed to interpolate before snapping. Zero to disable.

Declaration
public float ReceiveSnapScale
Field Value
Type Description
System.Single

ReceiveSnapVelocity

Maximum velocity difference allowed to interpolate before snapping. Zero to disable.

Declaration
public float ReceiveSnapVelocity
Field Value
Type Description
System.Single

RectTransform

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

SendIntervalMax

Maximum number of seconds to wait before sending an update.

Declaration
public float SendIntervalMax
Field Value
Type Description
System.Single

SendIntervalMin

Declaration
public float SendIntervalMin
Field Value
Type Description
System.Single

SendThresholdAngularVelocity

Minimum amount angular velocity is able to change before an update is sent.

Declaration
public float SendThresholdAngularVelocity
Field Value
Type Description
System.Single

SendThresholdExtrapolate

Should remote peer extrapolation be taken into account when checking for thresholds.

Declaration
public bool SendThresholdExtrapolate
Field Value
Type Description
System.Boolean

SendThresholdPosition

Minimum distance transform is able to move before an update is sent.

Declaration
public float SendThresholdPosition
Field Value
Type Description
System.Single

SendThresholdRectAnchors

Minimum RectTransform anchor is able to change before an update is sent.

Declaration
public float SendThresholdRectAnchors
Field Value
Type Description
System.Single

SendThresholdRectPivot

Minimum amount RectTransform pivot is able to change before an update is sent.

Declaration
public float SendThresholdRectPivot
Field Value
Type Description
System.Single

SendThresholdRectSizeDelta

Minimum amount RectTransform size is able to change before an update is sent.

Declaration
public float SendThresholdRectSizeDelta
Field Value
Type Description
System.Single

SendThresholdRotation

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

SendThresholdScale

Minimum amount transform is able to scale before an update is sent.

Declaration
public float SendThresholdScale
Field Value
Type Description
System.Single

SendThresholdVelocity

Minimum amount velocity is able to change before an update is sent.

Declaration
public float SendThresholdVelocity
Field Value
Type Description
System.Single

SyncAngularVelocity

Which angular velocity components to synchronize.

Declaration
public NetworkSyncModeVector3 SyncAngularVelocity
Field Value
Type Description
NetworkSyncModeVector3

SyncChannel

Network channel to use.

Declaration
public byte SyncChannel
Field Value
Type Description
System.Byte

SyncLocalTransform

Synchronize position and rotation in local space.

Declaration
public bool SyncLocalTransform
Field Value
Type Description
System.Boolean

SyncMethod

Which method to synchronize in.

Declaration
public NetworkSyncModeMethod SyncMethod
Field Value
Type Description
NetworkSyncModeMethod

SyncPosition

Which position components to synchronize.

Declaration
public NetworkSyncModeVector3 SyncPosition
Field Value
Type Description
NetworkSyncModeVector3

SyncRectAnchorMax

Should RectTransform anchorMax be synchronized.

Declaration
public NetworkSyncModeVector2 SyncRectAnchorMax
Field Value
Type Description
NetworkSyncModeVector2

SyncRectAnchorMin

Should RectTransform anchorMin be synchronized.

Declaration
public NetworkSyncModeVector2 SyncRectAnchorMin
Field Value
Type Description
NetworkSyncModeVector2

SyncRectPivot

Should RectTransform pivot be synchronized.

Declaration
public NetworkSyncModeVector2 SyncRectPivot
Field Value
Type Description
NetworkSyncModeVector2

SyncRectSizeDelta

Should RectTransform sizeDelta be synchronized.

Declaration
public NetworkSyncModeVector2 SyncRectSizeDelta
Field Value
Type Description
NetworkSyncModeVector2

SyncRotation

Which rotation components to synchronize.

Declaration
public NetworkSyncModeVector3 SyncRotation
Field Value
Type Description
NetworkSyncModeVector3

SyncScale

Which scale components to synchronize.

Declaration
public NetworkSyncModeVector3 SyncScale
Field Value
Type Description
NetworkSyncModeVector3

SyncVelocity

Which velocity components to synchronize.

Declaration
public NetworkSyncModeVector3 SyncVelocity
Field Value
Type Description
NetworkSyncModeVector3

Transform

Transform component to synchronize. Required.

Declaration
public Transform Transform
Field Value
Type Description
Transform

Properties

HasRectTransform

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

IsAuthority

Send updates to remote peers.

Declaration
public bool IsAuthority { get; }
Property Value
Type Description
System.Boolean

Methods

OnNetworkConnect(Peer)

Declaration
public override void OnNetworkConnect(Peer peer)
Parameters
Type Name Description
Peer peer
Overrides
NetworkComponent.OnNetworkConnect(Peer)

OnNetworkDisconnect(Peer)

Declaration
public override void OnNetworkDisconnect(Peer peer)
Parameters
Type Name Description
Peer peer
Overrides
NetworkComponent.OnNetworkDisconnect(Peer)

OnNetworkMessage(Peer, Reader, MessageReceived)

Declaration
public override void OnNetworkMessage(Peer peer, Reader reader, MessageReceived info)
Parameters
Type Name Description
Peer peer
Reader reader
MessageReceived info
Overrides
NetworkComponent.OnNetworkMessage(Peer, Reader, MessageReceived)

OnNetworkRegister()

Declaration
public override void OnNetworkRegister()
Overrides
NetworkComponent.OnNetworkRegister()

OnNetworkResend(Peer, Peer, Reader, MessageReceived)

Declaration
public override bool OnNetworkResend(Peer origin, Peer peer, Reader reader, MessageReceived info)
Parameters
Type Name Description
Peer origin
Peer peer
Reader reader
MessageReceived info
Returns
Type Description
System.Boolean
Overrides
NetworkComponent.OnNetworkResend(Peer, Peer, Reader, MessageReceived)

SetAuthority(Boolean)

Update authority on this component.

Declaration
public void SetAuthority(bool authority)
Parameters
Type Name Description
System.Boolean authority

Authority to set.

Explicit Interface Implementations

INetworkAuthoritative.OnNetworkAuthorityUpdate(Boolean, HostTimestamp)

Declaration
void INetworkAuthoritative.OnNetworkAuthorityUpdate(bool authority, HostTimestamp timestamp)
Parameters
Type Name Description
System.Boolean authority
HostTimestamp timestamp

INetworkRollbackable.OnNetworkRollbackBegin(HostTimestamp, Peer)

Declaration
void INetworkRollbackable.OnNetworkRollbackBegin(HostTimestamp time, Peer peer)
Parameters
Type Name Description
HostTimestamp time
Peer peer

INetworkRollbackable.OnNetworkRollbackEnd()

Declaration
void INetworkRollbackable.OnNetworkRollbackEnd()

Implements

INetworkAuthoritative
INetworkRollbackable
Back to top Generated by DocFX