Struct NetworkTransform.NetworkTransformState
Data structure used to synchronize the NetworkTransform
Implements
Inherited Members
Namespace: Unity.Netcode.Components
Assembly: solution.dll
Syntax
public struct NetworkTransform.NetworkTransformState : INetworkSerializable
Properties
| Name | Description |
|---|---|
| HasPositionChange | When set, at least one of the position axis values has changed. |
| HasPositionX | When set, the X-Axis position value has changed |
| HasPositionY | When set, the Y-Axis position value has changed |
| HasPositionZ | When set, the Z-Axis position value has changed |
| HasRotAngleChange | When set, at least one of the rotation axis values has changed. |
| HasRotAngleX | When set, the Euler rotation X-Axis value has changed. |
| HasRotAngleY | When set, the Euler rotation Y-Axis value has changed. |
| HasRotAngleZ | When set, the Euler rotation Z-Axis value has changed. |
| HasScaleChange | When set, at least one of the scale axis values has changed. |
| HasScaleX | When set, the X-Axis scale value has changed. |
| HasScaleY | When set, the Y-Axis scale value has changed. |
| HasScaleZ | When set, the Z-Axis scale value has changed. |
| InLocalSpace | When set, the NetworkTransform is operates in local space |
| IsSynchronizing | When set, this indicates it is the first state being synchronized. Typically when the associate NetworkObject is spawned or a client is being synchronized after connecting to a network session in progress. |
| IsTeleportingNextFrame | When set, the current state will be treated as a teleport. |
| LastSerializedSize | The last byte size of the NetworkTransform.NetworkTransformState updated. |
| QuaternionCompression | When set Quaternions will be compressed down to 4 bytes using a smallest three implementation. |
| QuaternionSync | When enabled, this NetworkTransform instance uses Quaternion synchronization. |
| UseHalfFloatPrecision | When set, the NetworkTransform will use half float precision for position, rotation, and scale. |
| UseInterpolation | When set the NetworkTransform is uses interpolation. |
| UsePositionSlerp | Determines if position interpolation will Slerp towards its target position. This is only really useful if you are moving around a point in a circular pattern. |
Methods
| Name | Description |
|---|---|
| GetNetworkTick() | The network tick that this state was sent by the authoritative instance. |
| GetPosition() | Returns the current state's position. If there is no change in position, then it returns zero. |
| GetRotation() | Returns the current state's rotation. If there is no change in the rotation, then it will return identity. |
| GetScale() | Returns the current state's scale. If there is no change in scale, then it returns zero. |
| NetworkSerialize<T>(BufferSerializer<T>) | Serializes this NetworkTransform.NetworkTransformState |