docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method WaitForConditionOrTimeOut

    WaitForConditionOrTimeOut(Func<bool>, TimeoutHelper)

    Waits for the function condition to return true or it will time out. This will operate at the current m_ServerNetworkManager.NetworkConfig.TickRate and allow for a unique TimeoutHelper handler (if none then it uses the default) Notes: This provides more stability when running integration tests that could be impacted by: -how the integration test is being executed (i.e. in editor or in a stand alone build) -potential platform performance issues (i.e. VM is throttled or maxed) Note: For more complex tests, ConditionalPredicateBase and the overloaded version of this method

    Declaration
    public static IEnumerator WaitForConditionOrTimeOut(Func<bool> checkForCondition, TimeoutHelper timeOutHelper = null)
    Parameters
    Type Name Description
    Func<bool> checkForCondition
    TimeoutHelper timeOutHelper
    Returns
    Type Description
    IEnumerator

    WaitForConditionOrTimeOut(IConditionalPredicate, TimeoutHelper)

    This version accepts an IConditionalPredicate implementation to provide more flexibility for checking complex conditional cases.

    Declaration
    public static IEnumerator WaitForConditionOrTimeOut(IConditionalPredicate conditionalPredicate, TimeoutHelper timeOutHelper = null)
    Parameters
    Type Name Description
    IConditionalPredicate conditionalPredicate
    TimeoutHelper timeOutHelper
    Returns
    Type Description
    IEnumerator
    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)