Skip to content

CoroutineManager.GenID

BelicusBr edited this page Sep 7, 2024 · 3 revisions

CoroutineManager.GenID() Method

Definition

Namespace: Cobilas.GodotEngine.Utility

Generates an ID to be used in a coroutine.

    public static string GenID()

Returns

string
The method will return an ID in string form.

Examples

using Godot;
using Cobilas.GodotEngine.Utility;

namespace Test {
   public class ClassTest : Node {
       private Coroutine coroutine1;

       public override void _Ready() {
           coroutine1 = new Coroutine(Corroutine1(), CoroutineManager.GenID());
       }

       private IEnumerator Corroutine1() {
           GD.Print("Zé da manga");
           //When the return is null, by default the coroutine is executed as _Process().
           yield return null;
       }
   }
}

Applies to

Product Versions
Godot 3.5
.NET Framework 4.7.2 or higher
.NET Standard 2.1 or higher
Package 1.0.0 or higher