Class ChildTransformTickSmoother
This class is under regular development and it's API may change at any time.
Inheritance
Implements
Inherited Members
Namespace: FishNet.Object.Prediction
Assembly: FishNet.Runtime.dll
Syntax
public sealed class ChildTransformTickSmoother : IResettable
Constructors
ChildTransformTickSmoother()
Declaration
[Preserve]
public ChildTransformTickSmoother()
Methods
Deinitialize()
Deinitializes this smoother resetting values.
Declaration
public void Deinitialize()
Finalize()
Declaration
protected void Finalize()
Initialize(Transform, Transform, Boolean, Single, Single, Byte, TransformPropertiesFlag)
Initializes this smoother non-networked use.
Declaration
public void Initialize(Transform rootTransform, Transform graphicalObject, bool detach, float teleportDistance, float tickDelta, byte ownerInterpolation, TransformPropertiesFlag ownerSmoothedProperties)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | rootTransform | |
UnityEngine.Transform | graphicalObject | |
System.Boolean | detach | |
System.Single | teleportDistance | |
System.Single | tickDelta | |
System.Byte | ownerInterpolation | |
TransformPropertiesFlag | ownerSmoothedProperties |
InitializeNetworked(NetworkObject, Transform, Boolean, Single, Single, Byte, TransformPropertiesFlag, Byte, TransformPropertiesFlag, AdaptiveInterpolationType)
Initializes this smoother for owner and spectator. This should only occur once.
Declaration
public void InitializeNetworked(NetworkObject nob, Transform graphicalObject, bool detach, float teleportDistance, float tickDelta, byte ownerInterpolation, TransformPropertiesFlag ownerSmoothedProperties, byte spectatorInterpolation, TransformPropertiesFlag specatorSmoothedProperties, AdaptiveInterpolationType adaptiveInterpolation)
Parameters
Type | Name | Description |
---|---|---|
NetworkObject | nob | |
UnityEngine.Transform | graphicalObject | |
System.Boolean | detach | |
System.Single | teleportDistance | |
System.Single | tickDelta | |
System.Byte | ownerInterpolation | |
TransformPropertiesFlag | ownerSmoothedProperties | |
System.Byte | spectatorInterpolation | |
TransformPropertiesFlag | specatorSmoothedProperties | |
AdaptiveInterpolationType | adaptiveInterpolation |
InitializeState()
Declaration
public void InitializeState()
OnPostReplay(UInt32)
Called when the TimeManager invokes OnPostReplay.
Declaration
public void OnPostReplay(uint clientTick)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | clientTick | Replay tick for the local client. |
OnPostTick(UInt32)
Called when TimeManager invokes OnPostTick.
Declaration
public void OnPostTick(uint clientTick)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | clientTick | Local tick of the client. |
OnPreReconcile()
Called when the PredictionManager invokes OnPreReconcile.
Declaration
public void OnPreReconcile()
OnPreTick()
Called when the TimeManager invokes OnPreTick.
Declaration
public void OnPreTick()
ResetState()
Declaration
public void ResetState()
SetAdaptiveInterpolation(AdaptiveInterpolationType)
Updates the adaptiveInterpolation value.
Declaration
public void SetAdaptiveInterpolation(AdaptiveInterpolationType adaptiveInterpolation)
Parameters
Type | Name | Description |
---|---|---|
AdaptiveInterpolationType | adaptiveInterpolation | New value. |
SetSmoothedProperties(TransformPropertiesFlag, Boolean)
Updates the smoothedProperties value.
Declaration
public void SetSmoothedProperties(TransformPropertiesFlag value, bool forSpectator)
Parameters
Type | Name | Description |
---|---|---|
TransformPropertiesFlag | value | New value. |
System.Boolean | forSpectator | True if updating values for the spectator, false if updating for owner. |
SetSpectatorInterpolation(Byte, Boolean)
Sets the spectator interpolation value.
Declaration
public void SetSpectatorInterpolation(byte value, bool disableAdaptiveInterpolation = true)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | value | New value. |
System.Boolean | disableAdaptiveInterpolation | True to also disable adaptive interpolation to use this new value. |
Teleport()
Teleports the graphical to it's starting position and clears the internal movement queue.
Declaration
public void Teleport()