docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IPauseCondition

    Represents a condition that can block the TimeStepScheduler from advancing simulation time.

    Namespace: Unity.SimulationPro.Foundation.ClockManagement
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    public interface IPauseCondition
    Remarks

    Implement this interface on MonoBehaviours or other objects that need to gate time progression. The scheduler queries RequestsPause each update and holds time while any registered condition returns true.

    Properties

    IsActive

    Gets a value indicating whether this condition should be evaluated by the scheduler.

    Declaration
    bool IsActive { get; }
    Property Value
    Type Description
    bool
    Remarks

    Most implementations map this to MonoBehaviour.isActiveAndEnabled.

    RequestsPause

    Gets a value indicating whether this condition is currently requesting that time be paused.

    Declaration
    bool RequestsPause { get; }
    Property Value
    Type Description
    bool

    Methods

    UpdateState()

    Called by the scheduler after time has advanced to allow this condition to re-evaluate its state.

    Declaration
    void UpdateState()
    Remarks

    Implementations may re-assert the pause request here, or use any custom logic to decide whether to set RequestsPause to true again.

    Events

    OnStateChange

    Raised whenever RequestsPause or IsActive changes. The TimeStepScheduler subscribes to this event to update its internal pause count.

    Declaration
    event EventHandler OnStateChange
    Event Type
    Type Description
    EventHandler
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)