hello can every one help me on WaitForSeconds?
is ALL DAY i try but nothing…online i see so much but NOTHING WORK, my code is this:
using UnityEngine;
using System.Collections;
public class porcacciodio : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Wait (10f);
}
IEnumerator Wait(float duration)
{
//This is a coroutine
Debug.Log("Start Wait() function. The time is: "+Time.time);
Debug.Log( "Float duration = "+duration);
yield return new WaitForSeconds(duration); //Wait
Debug.Log("End Wait() function and the time is: "+Time.time);
}
}
why it do not work??? NOTHING is displey in console…every one can help me please?