FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionStartCoroutine

more_horiz
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

descriptionStartCorourtine

more_horiz
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");
}
Permissions in this forum:
You cannot reply to topics in this forum