At least right now, IEnumerator methods are not treated in any special way, so they are not automatically treated as a Coroutine (even though that would be a good idea to add 🙂 ).
However, you could create a wrapper ‘Latent Action Node’ for your IEnumerator method like in the example bellow:
In the code above we simply wrap an IEnumerator method (CoroutineTest.TestCoroutine) in a FlowCanvas Latent Action Node and have the Invoke method of that node simply ‘yield return’ the started Coroutine from the IEnumerator method.
Let me know if something like the above works for you.
Thanks!
As I understood returning function as is from the LatentActionNode also works as expected – no need to StartCoroutine():
[Category(“Gameplay”)]
[Description(“Show a dialogue and wait till it end.”)]
public class ShowDialogue : LatentActionNode
{
public override IEnumerator Invoke(string dialogue)
{
return Dialogues.ShowDialogue(dialogue);
}
public override bool allowRoutineQueueing => false;
}