Class PromiseTimer | UIWidgets | 1.5.4-preview.12
docs.unity3d.com
    Show / Hide Table of Contents

    Class PromiseTimer

    Inheritance
    Object
    PromiseTimer
    Namespace: RSG
    Syntax
    public class PromiseTimer : IPromiseTimer

    Methods

    Cancel(IPromise)

    Declaration
    public bool Cancel(IPromise promise)
    Parameters
    Type Name Description
    IPromise promise
    Returns
    Type Description
    Boolean
    Implements
    IPromiseTimer.Cancel(IPromise)

    Update(Single)

    Update all pending promises. Must be called for the promises to progress and resolve at all.

    Declaration
    public void Update(float deltaTime)
    Parameters
    Type Name Description
    Single deltaTime
    Implements
    IPromiseTimer.Update(Single)

    WaitFor(Single)

    Resolve the returned promise once the time has elapsed

    Declaration
    public IPromise WaitFor(float seconds)
    Parameters
    Type Name Description
    Single seconds
    Returns
    Type Description
    IPromise
    Implements
    IPromiseTimer.WaitFor(Single)

    WaitUntil(Func<TimeData, Boolean>)

    Resolve the returned promise once the predicate evalutes to true

    Declaration
    public IPromise WaitUntil(Func<TimeData, bool> predicate)
    Parameters
    Type Name Description
    Func<TimeData, Boolean> predicate
    Returns
    Type Description
    IPromise
    Implements
    IPromiseTimer.WaitUntil(Func<TimeData, Boolean>)

    WaitWhile(Func<TimeData, Boolean>)

    Resolve the returned promise once the predicate evaluates to false

    Declaration
    public IPromise WaitWhile(Func<TimeData, bool> predicate)
    Parameters
    Type Name Description
    Func<TimeData, Boolean> predicate
    Returns
    Type Description
    IPromise
    Implements
    IPromiseTimer.WaitWhile(Func<TimeData, Boolean>)
    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