Hello Community. I have a script that instantiates an object at an interval of 10 seconds. It works great, but it stops after Zero to five times!! I think it is some Kind of Timing error, but I can’t understand what it is. Please take a look at the following code and let me know if you can help. Thanks!!
currentTime = DateTime.Now;
if(currentTime.Second == dtime)
{
time = currentTime;
Rigidbody drop = Instantiate (dropBox, dropPos.position, dropPos.rotation) as Rigidbody;
dropCheck = true;
dtime = time.Second + 10;
Debug.Log ("time.Second");
Debug.Log (time.Second.ToString ());
Debug.Log ("dtime");
Debug.Log (dtime.ToString ());
}