Class NetworkTransform
Inheritance
Inherited Members
Namespace: FishNet.Component.Transforming
Assembly: FishNet.Runtime.dll
Syntax
[DisallowMultipleComponent]
[AddComponentMenu("FishNet/Component/NetworkTransform")]
public sealed class NetworkTransform : NetworkBehaviour
Fields
MAX_INTERPOLATION
Maximum possible interpolation value.
Declaration
public const ushort MAX_INTERPOLATION = 250
Field Value
Type | Description |
---|---|
System.UInt16 |
Properties
ParentBehaviour
NetworkBehaviour this transform is a child of.
Declaration
public NetworkBehaviour ParentBehaviour { get; }
Property Value
Type | Description |
---|---|
NetworkBehaviour |
TakenOwnership
True if the local client used TakeOwnership and is awaiting an ownership change.
Declaration
public bool TakenOwnership { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ForceSend()
Resets last sent information to force a resend of current values.
Declaration
public void ForceSend()
ForceSend(UInt32)
Resets last sent information to force a resend of current values after a number of ticks.
Declaration
public void ForceSend(uint ticks)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | ticks |
GetSendToOwner()
Gets SendToOwner.
Declaration
public bool GetSendToOwner()
Returns
Type | Description |
---|---|
System.Boolean |
OnOwnershipClient(NetworkConnection)
Declaration
public override void OnOwnershipClient(NetworkConnection prevOwner)
Parameters
Type | Name | Description |
---|---|---|
NetworkConnection | prevOwner |
Overrides
OnOwnershipServer(NetworkConnection)
Declaration
public override void OnOwnershipServer(NetworkConnection prevOwner)
Parameters
Type | Name | Description |
---|---|---|
NetworkConnection | prevOwner |
Overrides
OnSpawnServer(NetworkConnection)
Declaration
public override void OnSpawnServer(NetworkConnection connection)
Parameters
Type | Name | Description |
---|---|---|
NetworkConnection | connection |
Overrides
OnStartClient()
Declaration
public override void OnStartClient()
Overrides
OnStartNetwork()
Declaration
public override void OnStartNetwork()
Overrides
OnStartServer()
Declaration
public override void OnStartServer()
Overrides
OnStopClient()
Declaration
public override void OnStopClient()
Overrides
OnStopNetwork()
Declaration
public override void OnStopNetwork()
Overrides
SetInterval(Byte)
Updates the interval value over the network.
Declaration
public void SetInterval(byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | value | New interval. |
SetPositionSnapping(NetworkTransform.SnappedAxes)
Sets which Position axes to snap.
Declaration
public void SetPositionSnapping(NetworkTransform.SnappedAxes axes)
Parameters
Type | Name | Description |
---|---|---|
NetworkTransform.SnappedAxes | axes | Axes to snap. |
SetRotationSnapping(NetworkTransform.SnappedAxes)
Sets which Scale axes to snap.
Declaration
public void SetRotationSnapping(NetworkTransform.SnappedAxes axes)
Parameters
Type | Name | Description |
---|---|---|
NetworkTransform.SnappedAxes | axes | Axes to snap. |
SetScaleSnapping(NetworkTransform.SnappedAxes)
Sets which Scale axes to snap.
Declaration
public void SetScaleSnapping(NetworkTransform.SnappedAxes axes)
Parameters
Type | Name | Description |
---|---|---|
NetworkTransform.SnappedAxes | axes | Axes to snap. |
SetSendToOwner(Boolean)
Sets SendToOwner. Only the server may call this method.
Declaration
public void SetSendToOwner(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | New value. |
SetSynchronizedProperties(SynchronizedProperty)
Updates which properties are synchronized.
Declaration
public void SetSynchronizedProperties(SynchronizedProperty value)
Parameters
Type | Name | Description |
---|---|---|
SynchronizedProperty | value | Properties to synchronize. |
SetSynchronizePosition(Boolean)
Sets if to synchronize position.
Declaration
public void SetSynchronizePosition(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | New value. |
SetSynchronizeRotation(Boolean)
Sets if to synchronize rotation.
Declaration
public void SetSynchronizeRotation(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | New value. |
SetSynchronizeScale(Boolean)
Sets if to synchronize scale.
Declaration
public void SetSynchronizeScale(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | New value. |
Teleport()
When called by the controller of this object the next changed data will be teleported to by spectators.
Declaration
public void Teleport()
Events
OnDataReceived
Called when new data is received. Previous and next data are provided. Next data may be manipulated.
Declaration
public event NetworkTransform.DataReceivedChanged OnDataReceived
Event Type
Type | Description |
---|---|
FishNet.Component.Transforming.NetworkTransform.DataReceivedChanged |
OnInterpolationComplete
Called when the transform has reached it's goal.
Declaration
public event Action OnInterpolationComplete
Event Type
Type | Description |
---|---|
System.Action |
OnNextGoal
Called when GoalData is updated.
Declaration
public event Action<NetworkTransform.GoalData> OnNextGoal
Event Type
Type | Description |
---|---|
System.Action<NetworkTransform.GoalData> |