HALF SECOND: how to use WaitForSeconds(0.5) ?

hi …
how can I use
yield return new WaitForSeconds(1);

but only half second
i mean … 0.5 of a second

this is my code but is not working
thansk for any help i will apreciate so much

    IEnumerator Void_imgRAW_SHOW()
    {      
        yield return new WaitForSeconds(0.5);
        imgRAW_SHOW.active = true;
    }

yield return new WaitForSeconds(0.5f);

8 Likes

When using Ienumorators you must call the function by a coroutine

StartCoroutine (functionname ());
3 Likes

@Basen1 is correct for how to use a 1/2 second (or any fraction).
The default value type of a decimal number is ‘double’. You add the suffix to indicate that it’s a ‘float’ type (which is what the argument expects) :slight_smile:

3 Likes

thnaks you !!!
i am going from .js to .cs
thanks a lot !!!

1 Like

Cool, glad ya got it fixed :slight_smile: