Class ClockSubscriber
Listens for msg signals via the configured topic, and utilizes the TimeStepApplier to step forward time when new signals are received.
Inheritance
ClockSubscriber
Inherited Members
Object.GetEntityId()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.SimulationPro.Foundation
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(TimeStepApplier))]
public class ClockSubscriber : SubscriberBehaviour<ClockMsg>
Properties
Callback
Gets the callback invoked each time a message is received on the subscribed topic.
Declaration
protected override Action<ClockMsg> Callback { get; }
Property Value
| Type | Description |
|---|---|
| Action<ClockMsg> |
Overrides
DefaultTopic
Gets the default topic name used when Topic has not been set.
Declaration
public override string DefaultTopic { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
SyncPhysicsToClockDelta
Gets or sets a value indicating whether Time.fixedDeltaTime is updated
to match the delta between consecutive clock messages.
Declaration
public bool SyncPhysicsToClockDelta { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Initialize()
Resets the subscriber's last applied time to zero, discarding any previously received timestamp.
Declaration
public void Initialize()
Start()
Start method.
Declaration
protected override void Start()