Search Unity

Help time c#

Discussion in 'Scripting' started by Neiro-ESP, Aug 1, 2015.

?

hi

  1. thanks

    1 vote(s)
    100.0%
  2. thanks

    0 vote(s)
    0.0%
  1. Neiro-ESP

    Neiro-ESP

    Joined:
    Jul 13, 2015
    Posts:
    7
  2. ande04b

    ande04b

    Joined:
    Aug 29, 2012
    Posts:
    119
    Your "yield return new WaitForSeconds(2)" statement must be on a line for itself, and ended with a semicolon. So must the "AvisoComprado.SetActive(true)" statement.

    EDIT:

    To clarify, in C#, a WaitForSeconds statement is correctly put "yield return new WaitForSeconds(X)" where X is the number of seconds you wish to wait for.

    This should do the trick:
    http://pastebin.com/T7qHkYpA
     
    Last edited: Aug 1, 2015