delay problem

I m using this piece of code in C#

for(int i = 0; i < 10; i++)


//I want some delay here

coinPicked.transform.position = new Vector3(coinPicked.transform.position.x, coinPicked.transform.position.y + 0.0001f, coinPicked.transform.position.z);


can anybody help me?

You may want to check WaitForSeconds

You will need to:

  1. Put your code above in an IEnumerator typed function
  2. Call yield return new WaitForSeconds( numberOfSeconds ) wherever you want the delay
  3. Call the IEnumerator using StartCoroutine( functionName )

Some examples in this answer and in this manual page.