How can I achieve this in C#. I need to wait until the parent node has finished his initialization.

yield(owner, "ready")

  • Instead of yielding, connect the ready signal from parent to child

Thanks will try it that way.

Do you know is it generally possible to "await" things with C# in Godot? So using Task, IEnumarators and async operations?

    16 days later

    patrick-rainer

    Yes, you can use Node.ToSignal(), like this:

    await ToSignal(GetTree(), "idle_frame");

    AnidemDex

    This can be achieved with:

    await ToSignal(GetParent(), "ready");
    a year later

    Or better yet:
    await ToSignal(Owner, SignalName.Ready);

    By using SignalName you avoid having to use string literals.
    And Owner might be better than parent, depending on what's happening in your code.
    Also, don't forget that the method this line is in will have to be set as async in order to use await.