docs.unity3d.com
    Show / Hide Table of Contents

    Class WaitUntilOrTimeOut

    A custom yield instruction that waits until a predicate is true or a timeout is reached.

    Inheritance
    Object
    CustomYieldInstruction
    WaitUntilOrTimeOut
    Inherited Members
    UnityEngine.CustomYieldInstruction.MoveNext()
    UnityEngine.CustomYieldInstruction.Reset()
    UnityEngine.CustomYieldInstruction.Current
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.AppUI.Tests
    Syntax
    public class WaitUntilOrTimeOut : CustomYieldInstruction, IEnumerator

    Constructors

    WaitUntilOrTimeOut(Func<Boolean>, Boolean, Nullable<TimeSpan>, String, String, Int32)

    Constructor.

    Declaration
    public WaitUntilOrTimeOut(Func<bool> predicate, bool failTestOnTimeout = true, TimeSpan? timeout = null, string callerMemberName = "", string callerFilePath = "", int callerLineNumber = 0)
    Parameters
    Type Name Description
    Func<Boolean> predicate

    The predicate to wait for.

    Boolean failTestOnTimeout

    If true, the test will fail if the timeout is reached.

    Nullable<TimeSpan> timeout

    The timeout.

    String callerMemberName

    The name of the calling method.

    String callerFilePath

    The path of the calling file.

    Int32 callerLineNumber

    The line number of the calling method.

    Properties

    keepWaiting

    Returns true if the instruction should keep waiting.

    Declaration
    public override bool keepWaiting { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    CustomYieldInstruction.keepWaiting
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023