Show / Hide Table of Contents

    Namespace Unity.EditorCoroutines.Editor

    Classes

    EditorCoroutine

    A handle to an EditorCoroutine, can be passed to EditorCoroutineUtility methods to control lifetime.

    EditorCoroutineUtility

    EditorWaitForSeconds

    Suspends the EditorCoroutine execution for the given amount of seconds, using unscaled time. The coroutine execution continues after the specified time has elapsed.

    using System.Collections;
    using UnityEngine;
    using Unity.EditorCoroutines.Editor;
    using UnityEditor;

    public class MyEditorWindow : EditorWindow { IEnumerator PrintEachSecond() { var waitForOneSecond = new EditorWaitForSeconds(1.0f);

        while (true)
        {
            yield return waitForOneSecond;
            Debug.Log("Printing each second");
        }
    }
    

    }

    EditorWindowCoroutineExtension

    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