Hey, all,
I’m trying to use a yield instruction in my code as follows:
void OnCollisionEnter (Collision col)
{
foreach ( ContactPoint Contact in col.contacts )
{
yield WaitForSeconds (5);
}
}
(simplified, as it keeps going wrong, so I’ve stripped it down to just this!)
Anyway, Unity keeps reporting the following error:
Error CS1002: Expecting ‘;’
But everything looks OK to me!?
I’m using C# - am I doing something wrong??
Help!!