Class WaitHelper
Inheritance
System.Object
WaitHelper
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: UniUtils.Data
Assembly: cs.temp.dll.dll
Syntax
public static class WaitHelper
Properties
WaitForEndOfFrame
Gets a WaitForEndOfFrame instance.
Declaration
public static WaitForEndOfFrame WaitForEndOfFrame { get; }
Property Value
Type | Description |
---|---|
WaitForEndOfFrame |
Examples
// Usage example:
IEnumerator ExampleCoroutine()
{
yield return WaitHelper.WaitForEndOfFrame;
}
WaitForFixedUpdate
Gets a WaitForFixedUpdate instance.
Declaration
public static WaitForFixedUpdate WaitForFixedUpdate { get; }
Property Value
Type | Description |
---|---|
WaitForFixedUpdate |
Examples
// Usage example:
IEnumerator ExampleCoroutine()
{
yield return WaitHelper.WaitForFixedUpdate;
}
Methods
WaitForSeconds(Single)
Gets a cached WaitForSeconds instance for the specified duration.
Declaration
public static WaitForSeconds WaitForSeconds(float seconds)
Parameters
Type | Name | Description |
---|---|---|
System.Single | seconds | The duration in seconds. |
Returns
Type | Description |
---|---|
WaitForSeconds | A WaitForSeconds instance. |
Examples
// Usage example:
IEnumerator ExampleCoroutine()
{
// Wait for 1 second using cached instance
yield return WaitHelper.WaitForSeconds(1f);
}
WaitForSecondsRealtime(Single)
Gets a cached WaitForSecondsRealtime instance for the specified duration.
Declaration
public static WaitForSecondsRealtime WaitForSecondsRealtime(float seconds)
Parameters
Type | Name | Description |
---|---|---|
System.Single | seconds | The duration in seconds. |
Returns
Type | Description |
---|---|
WaitForSecondsRealtime | A WaitForSecondsRealtime instance. |
Examples
// Usage example:
IEnumerator ExampleCoroutine()
{
// Wait for 1 second in real time using cached instance
yield return WaitHelper.WaitForSecondsRealtime(1f);
}