Is it possible to call a coroutine stored in a variable and use #pragma strict at the same time? And I’m sorry if this has already been answered or the question does not make sense.
#pragma strict
function Start ()
{
StartCoroutine(coroutineFunction(1.0f));
//works with #pragma strict
var testSimpleFunction : Function = simpleFunction;
testSimpleFunction(1.0f);
//works with #pragma strict
var testCoroutineFunction : Function = coroutineFunction;
StartCoroutine(testCoroutineFunction(1.0f));
//does not work with #pragma strict
//BCE0023: No appropriate version of 'UnityEngine.MonoBehaviour.StartCoroutine' for the argument list '(Object)' was found
}
function coroutineFunction (waitFor:float)
{
yield WaitForSeconds (waitFor);
Debug.Log("coroutineFunction");
}
function simpleFunction (simpleNumber:float)
{
Debug.Log("["+Time.frameCount+"]simpleFunction :"+simpleNumber);
}