0
Not a Bug

Method not invoked if the method returns IEnumerator

cooloon 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 2

How to reproduce:

1. Create new Unity project, install Bolt and set AOT Safe Mode enabled.

2. Create a script like this and hit Built Unit Options:

using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour
{
    public IEnumerator Tween()
    {
        Debug.LogFormat("[{0}] {1}.{2}()", Time.frameCount, GetType().Name, System.Reflection.MethodBase.GetCurrentMethod().Name);
        yield return null;
    }
    public void VoidMethod()
    {
        Debug.LogFormat("[{0}] {1}.{2}()", Time.frameCount, GetType().Name, System.Reflection.MethodBase.GetCurrentMethod().Name);
    }
}

3. Create this graph and play:


After you hit the play button,

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED
Satisfaction mark by cooloon 2 years ago

Please drop this Topic. This is not a bug but C# default behaviour.

+1
Not a Bug

Indeed!

I should create a WaitForCoroutine unit though.