docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method WaitForConditionOrTimeOutWithTimeTravel

    WaitForConditionOrTimeOutWithTimeTravel(Func<bool>, int)

    Waits for the function condition to return true or it will time out. Uses time travel to simulate this for the given number of frames, simulating delta times at the application frame rate.

    Declaration
    public bool WaitForConditionOrTimeOutWithTimeTravel(Func<bool> checkForCondition, int maxTries = 60)
    Parameters
    Type Name Description
    Func<bool> checkForCondition
    int maxTries
    Returns
    Type Description
    bool

    WaitForConditionOrTimeOutWithTimeTravel(IConditionalPredicate, int)

    This version accepts an IConditionalPredicate implementation to provide more flexibility for checking complex conditional cases. Uses time travel to simulate this for the given number of frames, simulating delta times at the application frame rate.

    Declaration
    public bool WaitForConditionOrTimeOutWithTimeTravel(IConditionalPredicate conditionalPredicate, int maxTries = 60)
    Parameters
    Type Name Description
    IConditionalPredicate conditionalPredicate
    int maxTries
    Returns
    Type Description
    bool
    In This Article
    Back to top
    Copyright © 2024 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)