docs.unity.cn
    Show / Hide Table of Contents

    Class ExitPlayMode

    Implements IEditModeTestYieldInstruction. A new instance of the class is a yield instruction to exit Play Mode.

    Inheritance
    Object
    ExitPlayMode
    Namespace: UnityEngine.TestTools
    Syntax
    public class ExitPlayMode : IEditModeTestYieldInstruction

    Constructors

    ExitPlayMode()

    Sets ExpectDomainReload and ExpectedPlaymodeState to false.

    Declaration
    public ExitPlayMode()

    Properties

    ExpectDomainReload

    Gets the value of ExpectDomainReload

    Declaration
    public bool ExpectDomainReload { get; }
    Property Value
    Type Description
    Boolean
    Implements
    IEditModeTestYieldInstruction.ExpectDomainReload

    ExpectedPlaymodeState

    Gets the value of ExpectedPlaymodeState

    Declaration
    public bool ExpectedPlaymodeState { get; }
    Property Value
    Type Description
    Boolean
    Implements
    IEditModeTestYieldInstruction.ExpectedPlaymodeState

    Methods

    Perform()

    Performs the multi-step instruction of exiting PlayMode.

    Declaration
    public IEnumerator Perform()
    Returns
    Type Description
    IEnumerator

    An IEnumerator with the async steps.

    Implements
    IEditModeTestYieldInstruction.Perform()
    Exceptions
    Type Condition
    Exception

    An exception is thrown if the editor is not in PlayMode.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, July 19, 2022
    Terms of use