• Api Documentation
  • Manual
Show / Hide Table of Contents
  • FishNet
    • InstanceFinder
  • FishNet.Authenticating
    • Authenticator
  • FishNet.Broadcast
    • IBroadcast
  • FishNet.Broadcast.Helping
    • BroadcastHandlerBase
  • FishNet.CodeGenerating
    • AllowMutableSyncTypeAttribute
    • CustomComparerAttribute
    • DefaultDeltaReaderAttribute
    • DefaultDeltaWriterAttribute
    • DefaultReaderAttribute
    • DefaultWriterAttribute
    • ExcludeSerializationAttribute
    • IncludeSerializationAttribute
    • NotSerializerAttribute
    • ReadUnallocatedAttribute
    • UseGlobalCustomSerializerAttribute
  • FishNet.Component.Animating
    • NetworkAnimator
  • FishNet.Component.ColliderRollback
    • ColliderRollback
    • RollbackManager
    • RollbackPhysicsType
  • FishNet.Component.Observing
    • DistanceCondition
    • GridCondition
    • GridEntry
    • HashGrid
    • HashGrid.GridAxes
    • HostOnlyCondition
    • MatchCondition
    • MatchCondition.ConditionCollections
    • OwnerOnlyCondition
    • SceneCondition
  • FishNet.Component.Ownership
    • PredictedOwner
    • PredictedSpawn
  • FishNet.Component.Prediction
    • NetworkCollider
    • NetworkCollider2D
    • NetworkCollision
    • NetworkCollision2D
    • NetworkTrigger
    • NetworkTrigger2D
    • OfflineRigidbody
    • Rigidbody2DState
    • RigidbodyPauser
    • RigidbodyState
    • RigidbodyStateExtensions
    • RigidbodyStateSerializers
    • RigidbodyType
  • FishNet.Component.Scenes
    • DefaultScene
  • FishNet.Component.Spawning
    • PlayerSpawner
  • FishNet.Component.Transforming
    • DetachableNetworkTickSmoother
    • MonoTickSmoother
    • NetworkTickSmoother
    • NetworkTransform
    • NetworkTransform.ComponentConfigurationType
    • NetworkTransform.GoalData
    • NetworkTransform.RateData
    • NetworkTransform.SnappedAxes
    • NetworkTransform.TransformData
    • NetworkTransform.TransformData.ExtrapolateState
    • SynchronizedProperty
  • FishNet.Component.Utility
    • BandwidthDisplay
    • PingDisplay
  • FishNet.Connection
    • NetworkConnection
    • NetworkConnectionExtensions
  • FishNet.Managing
    • NetworkManager
    • NetworkManager.HostIterationOrder
    • NetworkManager.PersistenceType
    • NetworkManagerExtensions
    • RemoteTimeoutType
  • FishNet.Managing.Client
    • ClientManager
    • ClientObjects
  • FishNet.Managing.Debugging
    • DebugManager
  • FishNet.Managing.Logging
    • LevelLoggingConfiguration
    • LoggingConfiguration
    • LoggingType
  • FishNet.Managing.Object
    • DualPrefab
    • ManagedObjects
  • FishNet.Managing.Observing
    • ObserverManager
  • FishNet.Managing.Predicting
    • PredictionManager
    • PredictionManager.PostPhysicsSyncTransformDel
    • PredictionManager.PostReconcileDel
    • PredictionManager.PostReplicateReplayDel
    • PredictionManager.PrePhysicsSyncTransformDel
    • PredictionManager.PreReconcileDel
    • PredictionManager.PreReplicateReplayDel
    • PredictionManager.ReconcileDel
    • PredictionManager.ReplicateReplayDel
    • ReplicateStateOrder
  • FishNet.Managing.Scened
    • ClientPresenceChangeEventArgs
    • DefaultSceneProcessor
    • EmptyStartScenesBroadcast
    • LoadOptions
    • LoadParams
    • LoadQueueData
    • PreferredScene
    • ReplaceOption
    • SceneLoadData
    • SceneLoadEndEventArgs
    • SceneLoadPercentEventArgs
    • SceneLoadStartEventArgs
    • SceneLookupData
    • SceneManager
    • SceneProcessorBase
    • SceneScopeType
    • SceneUnloadData
    • SceneUnloadEndEventArgs
    • SceneUnloadStartEventArgs
    • UnloadedScene
    • UnloadOptions
    • UnloadOptions.ServerUnloadMode
    • UnloadParams
    • UnloadQueueData
  • FishNet.Managing.Server
    • ClientConnectionChangeBroadcast
    • ConnectedClientsBroadcast
    • KickReason
    • ServerManager
    • ServerObjects
  • FishNet.Managing.Statistic
    • NetworkTrafficArgs
    • NetworkTraficStatistics
    • StatisticsManager
  • FishNet.Managing.Timing
    • EstimatedTick
    • EstimatedTick.OldTickOption
    • PhysicsMode
    • PreciseTick
    • PreciseTickExtensions
    • PreciseTickSerializer
    • TickRounding
    • TickType
    • TimeManager
  • FishNet.Managing.Transporting
    • IntermediateLayer
    • LatencySimulator
    • TransportManager
  • FishNet.Managing.Utility
    • Packets
  • FishNet.Object
    • ClientAttribute
    • DataOrderType
    • DespawnType
    • EmptyNetworkBehaviour
    • GlobalPreserveOwnedObjects
    • NetworkBehaviour
    • NetworkObject
    • NetworkObject.HostVisibilityUpdatedDelegate
    • NetworkObjectIdComparer
    • NetworkPreserveOwnedObjects
    • ObserversRpcAttribute
    • ReplicateState
    • ReplicateStateExtensions
    • RpcAttribute
    • ServerAttribute
    • ServerRpcAttribute
    • TargetRpcAttribute
    • TransformProperties
    • TransformPropertiesCls
    • TransformPropertiesFlag
    • TransformPropertiesOptionExtensions
  • FishNet.Object.Prediction
    • AdaptiveInterpolationType
    • ChildTransformTickSmoother
    • IReconcileData
    • IReplicateData
    • PredictionigidbodySerializers
    • PredictionRigidbody
    • PredictionRigidbody.AllForceData
    • PredictionRigidbody.EntryData
    • PredictionRigidbody.ForceApplicationType
    • PredictionRigidbody.IForceData
    • PredictionRigidbody2D
    • PredictionRigidbody2D.AllForceData
    • PredictionRigidbody2D.EntryData
    • PredictionRigidbody2D.ForceApplicationType
    • PredictionRigidbody2D2DSerializers
    • ReconcileAttribute
    • ReplicateAttribute
  • FishNet.Object.Synchronizing
    • ByteSyncVar
    • DoubleSyncVar
    • FloatSyncVar
    • ICustomSync
    • IntSyncVar
    • LongSyncVar
    • ReadPermission
    • SbyteSyncVar
    • ShortSyncVar
    • SyncDictionary<TKey, TValue>
    • SyncHashSet<T>
    • SyncList<T>
    • SyncObjectAttribute
    • SyncStopwatch
    • SyncStopwatch.SyncTypeChanged
    • SyncStopwatchOperation
    • SyncTimer
    • SyncTimer.SyncTypeChanged
    • SyncTimerOperation
    • SyncTypeSettings
    • SyncVarAttribute
    • UIntSyncVar
    • ULongSyncVar
    • UShortSyncVar
    • Vector2IntSyncVar
    • Vector2SyncVar
    • Vector3IntSyncVar
    • Vector3SyncVar
    • Vector4SyncVar
    • WritePermission
  • FishNet.Observing
    • HostVisibilityUpdateTypes
    • NetworkObserver
    • NetworkObserver.ConditionOverrideType
    • ObserverCondition
    • ObserverConditionType
  • FishNet.Serializing
    • AutoPackType
    • DeltaSerializerOption
    • DeltaSerializerOptionExtensions
    • PooledReader
    • PooledWriter
    • Reader
    • Reader.DataSource
    • ReaderPool
    • SubStream
    • Writer
    • WriterPool
  • FishNet.Transporting
    • Channel
    • ClientConnectionStateArgs
    • ClientReceivedDataArgs
    • ConnectedClientsArgs
    • IPAddressType
    • LocalConnectionState
    • RemoteConnectionState
    • RemoteConnectionStateArgs
    • ServerConnectionStateArgs
    • ServerReceivedDataArgs
    • Transport
    • TransportConsts
  • GameKit.Dependencies.Utilities
    • ApplicationState
    • Arrays
    • BasicQueue<T>
    • Booleans
    • Bytes
    • CanvaseGroups
    • CanvasGroupBlockingType
    • CollectionCaches<T>
    • CollectionCaches<T1, T2>
    • Collider2DExtensions
    • ColliderExtensions
    • DictionaryFN
    • Disks
    • Enums
    • Floats
    • Hashing
    • Ints
    • IOs
    • IResettable
    • IWeighted
    • Layers
    • LayoutGroups
    • Materials
    • Maths
    • ObjectCaches<T>
    • Objects
    • Particles
    • PointerMonoBehaviour
    • Quaternions
    • ResettableCollectionCaches<T>
    • ResettableCollectionCaches<T1, T2>
    • ResettableObjectCaches<T>
    • ResettableT1CollectionCaches<T1, T2>
    • ResettableT2CollectionCaches<T1, T2>
    • Strings
    • Transforms
    • UInts
    • Vectors
    • WeightedRandom
  • GameKit.Dependencies.Utilities.ObjectPooling
    • ListStack<GameObject>
    • ObjectPool
    • PoolData
  • GameKit.Dependencies.Utilities.ObjectPooling.Examples
    • Projectile
    • ProjectileSpawner
  • GameKit.Dependencies.Utilities.Types
    • ByteRange
    • CanvasGroupFader
    • CanvasGroupFader.FadeGoalType
    • CanvasTracker
    • DDOL
    • FloatRange
    • FloatRange2D
    • IntRange
    • IOrderable
    • RectTransformResizer
    • RectTransformResizer.ResizeData
    • RectTransformResizer.ResizeDelegate
    • ResettableRingBuffer<T>
    • ResettableRingBuffer<T>.Enumerator
    • RingBuffer<T>
    • RingBuffer<T>.Enumerator
    • SceneAttribute
    • ScrollbarValueSetter
    • SingletonScriptableObject<T>
    • SmoothCameraTarget
    • TimedOperation
    • UIntRange
    • Vector2Range
  • GameKit.Dependencies.Utilities.Types.CanvasContainers
    • ButtonData
    • ButtonData.PressedDelegate
    • FloatingContainer
    • FloatingImage
    • ImageButtonData
    • ResizableContainer
  • GameKit.Dependencies.Utilities.Types.OptionMenuButtons
    • FloatingOptions

Class TimeManager

Provides data and actions for network time and tick based systems.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
TimeManager
Inherited Members
UnityEngine.MonoBehaviour.IsInvoking()
UnityEngine.MonoBehaviour.CancelInvoke()
UnityEngine.MonoBehaviour.Invoke(System.String, System.Single)
UnityEngine.MonoBehaviour.InvokeRepeating(System.String, System.Single, System.Single)
UnityEngine.MonoBehaviour.CancelInvoke(System.String)
UnityEngine.MonoBehaviour.IsInvoking(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String, System.Object)
UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StartCoroutine_Auto(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(UnityEngine.Coroutine)
UnityEngine.MonoBehaviour.StopCoroutine(System.String)
UnityEngine.MonoBehaviour.StopAllCoroutines()
UnityEngine.MonoBehaviour.print(System.Object)
UnityEngine.MonoBehaviour.useGUILayout
UnityEngine.MonoBehaviour.runInEditMode
UnityEngine.Behaviour.enabled
UnityEngine.Behaviour.isActiveAndEnabled
UnityEngine.Component.GetComponent(System.Type)
UnityEngine.Component.GetComponent<T>()
UnityEngine.Component.TryGetComponent(System.Type, UnityEngine.Component)
UnityEngine.Component.TryGetComponent<T>(T)
UnityEngine.Component.GetComponent(System.String)
UnityEngine.Component.GetComponentInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentInChildren(System.Type)
UnityEngine.Component.GetComponentInChildren<T>(System.Boolean)
UnityEngine.Component.GetComponentInChildren<T>()
UnityEngine.Component.GetComponentsInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentsInChildren(System.Type)
UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean)
UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean, System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentsInChildren<T>()
UnityEngine.Component.GetComponentsInChildren<T>(System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentInParent(System.Type, System.Boolean)
UnityEngine.Component.GetComponentInParent(System.Type)
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Component.GetComponentInParent<T>()
UnityEngine.Component.GetComponentsInParent(System.Type, System.Boolean)
UnityEngine.Component.GetComponentsInParent(System.Type)
UnityEngine.Component.GetComponentsInParent<T>(System.Boolean)
UnityEngine.Component.GetComponentsInParent<T>(System.Boolean, System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentsInParent<T>()
UnityEngine.Component.GetComponents(System.Type)
UnityEngine.Component.GetComponents(System.Type, System.Collections.Generic.List<UnityEngine.Component>)
UnityEngine.Component.GetComponents<T>(System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponents<T>()
UnityEngine.Component.CompareTag(System.String)
UnityEngine.Component.SendMessageUpwards(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessageUpwards(System.String, System.Object)
UnityEngine.Component.SendMessageUpwards(System.String)
UnityEngine.Component.SendMessageUpwards(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessage(System.String, System.Object)
UnityEngine.Component.SendMessage(System.String)
UnityEngine.Component.SendMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessage(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.BroadcastMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.BroadcastMessage(System.String, System.Object)
UnityEngine.Component.BroadcastMessage(System.String)
UnityEngine.Component.BroadcastMessage(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.transform
UnityEngine.Component.gameObject
UnityEngine.Component.tag
UnityEngine.Object.GetInstanceID()
UnityEngine.Object.GetHashCode()
UnityEngine.Object.Equals(System.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Instantiate<T>(T)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
UnityEngine.Object.Destroy(UnityEngine.Object)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
UnityEngine.Object.FindObjectsOfType(System.Type)
UnityEngine.Object.FindObjectsOfType(System.Type, System.Boolean)
UnityEngine.Object.FindObjectsByType(System.Type, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsByType(System.Type, UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
UnityEngine.Object.DestroyObject(UnityEngine.Object)
UnityEngine.Object.FindSceneObjectsOfType(System.Type)
UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
UnityEngine.Object.FindObjectsOfType<T>()
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>()
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type)
UnityEngine.Object.FindFirstObjectByType(System.Type)
UnityEngine.Object.FindAnyObjectByType(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type, System.Boolean)
UnityEngine.Object.FindFirstObjectByType(System.Type, UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType(System.Type, UnityEngine.FindObjectsInactive)
UnityEngine.Object.ToString()
UnityEngine.Object.name
UnityEngine.Object.hideFlags
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FishNet.Managing.Timing
Assembly: FishNet.Runtime.dll
Syntax
[DisallowMultipleComponent]
[AddComponentMenu("FishNet/Manager/TimeManager")]
public sealed class TimeManager : MonoBehaviour

Fields

UNSET_TICK

Value for a tick that is invalid.

Declaration
public const uint UNSET_TICK = 0U
Field Value
Type Description
System.UInt32

Properties

ClientUptime

How long the local client has been connected.

Declaration
public float ClientUptime { get; }
Property Value
Type Description
System.Single

FrameTicked

True if the TimeManager will or has ticked this frame.

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

LastPacketTick

Tick on the last received packet, be it from server or client.

Declaration
public EstimatedTick LastPacketTick { get; }
Property Value
Type Description
EstimatedTick

LocalTick

A tick that is not synchronized. This value will only increment. May be used for indexing or Ids with custom logic. When called on the server Tick is returned, otherwise LocalTick is returned. This value resets upon disconnecting.

Declaration
public uint LocalTick { get; }
Property Value
Type Description
System.UInt32

NetworkManager

NetworkManager used with this.

Declaration
public NetworkManager NetworkManager { get; }
Property Value
Type Description
NetworkManager

PhysicsMode

How to perform physics.

Declaration
public PhysicsMode PhysicsMode { get; }
Property Value
Type Description
PhysicsMode

PingInterval

How often in seconds to a connections ping. This is also responsible for approximating server tick. This value does not affect prediction.

Declaration
public byte PingInterval { get; }
Property Value
Type Description
System.Byte

RoundTripTime

RoundTripTime in milliseconds. This value includes latency from the tick rate.

Declaration
public long RoundTripTime { get; }
Property Value
Type Description
System.Int64

ServerUptime

How long the local server has been connected.

Declaration
public float ServerUptime { get; }
Property Value
Type Description
System.Single

Tick

Current approximate network tick as it is on server. When running as client only this is an approximation to what the server tick is. The value of this field may increase and decrease as timing adjusts. This value is reset upon disconnecting. Tick can be used to get the server time by using TicksToTime(). Use LocalTick for values that only increase.

Declaration
public uint Tick { get; }
Property Value
Type Description
System.UInt32

TickDelta

A fixed deltaTime for TickRate.

Declaration
[HideInInspector]
public double TickDelta { get; }
Property Value
Type Description
System.Double

TickRate

How many times per second the server will simulate. This does not limit server frame rate.

Declaration
public ushort TickRate { get; }
Property Value
Type Description
System.UInt16

Methods

GetPhysicsTimeScale()

Gets the current physics time scale.

Declaration
public float GetPhysicsTimeScale()
Returns
Type Description
System.Single

GetPreciseTick(TickType)

Returns a PreciseTick.

Declaration
public PreciseTick GetPreciseTick(TickType tickType)
Parameters
Type Name Description
TickType tickType

Tick to use within PreciseTick.

Returns
Type Description
PreciseTick

GetPreciseTick(UInt32)

Returns a PreciseTick.

Declaration
public PreciseTick GetPreciseTick(uint tick)
Parameters
Type Name Description
System.UInt32 tick

Tick to set within the returned PreciseTick.

Returns
Type Description
PreciseTick

GetTickPercentAsByte()

Returns the percentage of how far the TimeManager is into the next tick. Value will return between 0 and 100.

Declaration
public byte GetTickPercentAsByte()
Returns
Type Description
System.Byte

GetTickPercentAsDouble()

Returns the percentage of how far the TimeManager is into the next tick as a double. Value will return between 0d and 1d.

Declaration
public double GetTickPercentAsDouble()
Returns
Type Description
System.Double

GetTickPercentAsDouble(Byte)

Converts a 0 to 100 byte value to a 0d to 1d percent value. This does not check for excessive byte values, such as anything over 100.

Declaration
public static double GetTickPercentAsDouble(byte value)
Parameters
Type Name Description
System.Byte value
Returns
Type Description
System.Double

LocalTickToTick(UInt32)

Estimatedly converts a local tick to what it would be for the synchronized tick.

Declaration
public uint LocalTickToTick(uint localTick)
Parameters
Type Name Description
System.UInt32 localTick

Local tick to convert.

Returns
Type Description
System.UInt32

SetPhysicsMode(PhysicsMode)

Updates physics based on which physics mode to use.

Declaration
public void SetPhysicsMode(PhysicsMode mode)
Parameters
Type Name Description
PhysicsMode mode

SetPhysicsTimeScale(Single)

Sets the physics time scale. This is not automatically synchronized.

Declaration
public void SetPhysicsTimeScale(float value)
Parameters
Type Name Description
System.Single value

New value.

SetTickRate(UInt16)

Sets the TickRate to use. This value is not synchronized, it must be set on client and server independently.

Declaration
public void SetTickRate(ushort value)
Parameters
Type Name Description
System.UInt16 value

New TickRate to use.

TicksToTime(PreciseTick)

Converts a PreciseTick to time.

Declaration
public double TicksToTime(PreciseTick pt)
Parameters
Type Name Description
PreciseTick pt

PreciseTick to convert.

Returns
Type Description
System.Double

TicksToTime(TickType)

Converts current ticks to time.

Declaration
public double TicksToTime(TickType tickType = TickType.LocalTick)
Parameters
Type Name Description
TickType tickType

TickType to compare against.

Returns
Type Description
System.Double

TicksToTime(UInt32)

Converts a number ticks to time.

Declaration
public double TicksToTime(uint ticks)
Parameters
Type Name Description
System.UInt32 ticks

Ticks to convert.

Returns
Type Description
System.Double

TickToLocalTick(UInt32)

Estimatedly converts a synchronized tick to what it would be for the local tick.

Declaration
public uint TickToLocalTick(uint tick)
Parameters
Type Name Description
System.UInt32 tick

Synchronized tick to convert.

Returns
Type Description
System.UInt32

TimePassed(PreciseTick, Boolean)

Gets time passed from Tick to preciseTick.

Declaration
public double TimePassed(PreciseTick preciseTick, bool allowNegative = false)
Parameters
Type Name Description
PreciseTick preciseTick

PreciseTick value to compare against.

System.Boolean allowNegative

True to allow negative values. When false and value would be negative 0 is returned.

Returns
Type Description
System.Double

TimePassed(UInt32, Boolean)

Gets time passed from Tick to previousTick.

Declaration
public double TimePassed(uint previousTick, bool allowNegative = false)
Parameters
Type Name Description
System.UInt32 previousTick

The previous tick.

System.Boolean allowNegative

True to allow negative values. When false and value would be negative 0 is returned.

Returns
Type Description
System.Double

TimePassed(UInt32, UInt32)

Gets time passed from currentTick to previousTick.

Declaration
public double TimePassed(uint currentTick, uint previousTick)
Parameters
Type Name Description
System.UInt32 currentTick

The current tick.

System.UInt32 previousTick

The previous tick.

Returns
Type Description
System.Double

TimeToPreciseTick(Double)

Converts time to a PreciseTick.

Declaration
public PreciseTick TimeToPreciseTick(double time)
Parameters
Type Name Description
System.Double time

Time to convert.

Returns
Type Description
PreciseTick

TimeToTicks(Double, TickRounding)

Converts time to ticks.

Declaration
public uint TimeToTicks(double time, TickRounding rounding = TickRounding.RoundNearest)
Parameters
Type Name Description
System.Double time

Time to convert.

TickRounding rounding
Returns
Type Description
System.UInt32

Events

OnFixedUpdate

Called when MonoBehaviours call FixedUpdate.

Declaration
public event Action OnFixedUpdate
Event Type
Type Description
System.Action

OnLateUpdate

Called when MonoBehaviours call LateUpdate.

Declaration
public event Action OnLateUpdate
Event Type
Type Description
System.Action

OnPostPhysicsSimulation

When using TimeManager for physics timing, this is called immediately after the physics simulation has occured for the tick. While using Unity for physics timing, this is called during Update, only if a physics frame. This may be useful if you wish to run physics differently for stacked scenes.

Declaration
public event Action<float> OnPostPhysicsSimulation
Event Type
Type Description
System.Action<System.Single>

OnPostTick

Called after a tick occurs; physics would have simulated if using PhysicsMode.TimeManager.

Declaration
public event Action OnPostTick
Event Type
Type Description
System.Action

OnPrePhysicsSimulation

When using TimeManager for physics timing, this is called immediately before physics simulation will occur for the tick. While using Unity for physics timing, this is called during FixedUpdate. This may be useful if you wish to run physics differently for stacked scenes.

Declaration
public event Action<float> OnPrePhysicsSimulation
Event Type
Type Description
System.Action<System.Single>

OnPreTick

Called right before a tick occurs, as well before data is read.

Declaration
public event Action OnPreTick
Event Type
Type Description
System.Action

OnRoundTripTimeUpdated

Called when the local clients ping is updated.

Declaration
public event Action<long> OnRoundTripTimeUpdated
Event Type
Type Description
System.Action<System.Int64>

OnTick

Called when a tick occurs.

Declaration
public event Action OnTick
Event Type
Type Description
System.Action

OnUpdate

Called when MonoBehaviours call Update.

Declaration
public event Action OnUpdate
Event Type
Type Description
System.Action
In This Article
Back to top Generated by DocFX