Class 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"); } }
}
Inheritance
System.Object
EditorWaitForSeconds
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Unity.EditorCoroutines.Editor
Syntax
public class EditorWaitForSeconds
Constructors
EditorWaitForSeconds(Single)
Creates a instruction object for yielding inside a generator function.
Declaration
public EditorWaitForSeconds(float time)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The amount of time to wait in seconds. |
Properties
WaitTime
The time to wait in seconds.
Declaration
public double WaitTime { get; }
Property Value
Type | Description |
---|---|
System.Double |