Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » General Dicussions » StartCoroutine

StartCoroutine

View previous topic View next topic Go down  Message [Page 1 of 1]

1 StartCoroutine on Sun Nov 01, 2015 4:54 pm

Can Nguyen


Member [Lv. 1]
Member [Lv. 1]
Hello everyone,

I am currently studying a script on how to spawn an object. I've come across this the statement StartCoroutine(). I am unsure how this statement works. I'm hoping you guys can help me figure it out. Thank you! Very Happy

View user profile

2 StartCorourtine on Wed Dec 09, 2015 8:20 pm

jakeyiii


Member [Lv. 3]
Member [Lv. 3]
Hey

it's actually rather simple, it's just like a delay or what you want called mainly locally.

it goes like this

Code:


void Start()
{
    StartCoroutine(0.2f);
}

IEnumerator NAME(float TIME)
{
    yield return new waitForSeconds(TIME);
    print("Called My Logic Register at http://vertualmyth.com/ for more deals :D");
}

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum