Has anyone noticed this?
If you use InvokeRepeating, with the first argument exactly zero …
it seems to fire TWICE on that first firing. Strange!
Does everyone else know this other than me? Is this a well-known bug?
Thanks…
Has anyone noticed this?
If you use InvokeRepeating, with the first argument exactly zero …
it seems to fire TWICE on that first firing. Strange!
Does everyone else know this other than me? Is this a well-known bug?
Thanks…
Huh, I’m getting the same results with this very simple test script:
using UnityEngine;
using System.Collections;
public class InvokeTest : MonoBehaviour
{
void Start ()
{
InvokeRepeating("Tick", 0f, 1f);
}
void Tick()
{
Debug.Log(Time.timeSinceLevelLoad);
}
}
“0” logs twice, with further logs coming in once every second.
This is the first I’ve heard of this issue, but I found this thread from last December, which includes a suggestion to use a very small number like 0.001 instead of 0.