This question was
closed Nov 30, 2015 at 04:32 PM by
Max_power1965 for the following reason:
Question is off-topic or not relevant
Question by
Max_power1965 · Nov 30, 2015 at 03:30 PM ·
functionsfunction call
Invoke function it is called only once
Hello, here it's the code:
void Start () {
Init();
Invoke("TriggerMovingPistionAction",3);
}
private void TriggerMovingPistionAction()
{
Debug.Log("Test");
}
the problem it's that the "Test" message it's printed only once. So the Invoke function it's not working properly! What is the problem?
Comment
Best Answer
Answer by gjf · Nov 30, 2015 at 03:30 PM
it's working as expected, just not as you expect it ;)
if you're looking for some repeated behavior then try InvokeRepeating()
...