Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

loop code for X seconds

float timePassed = 0f;
void Update()
{
    timePassed += Time.deltaTime;
    if(timePassed > 5f)
    {
        //do something
    } 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #code #X #seconds
ADD COMMENT
Topic
Name
7+5 =