- Home /
How do next steps of script only one time use real time(Time.time)?
Why it's not working?
{
if (Time.time == 3)
{. . .}
}
Comment
It's working only when I have Time.time >= 3, but it's working everytime after 3 seconds, but I need only one time after 3 seconds
Best Answer
Answer by hexagonius · Jan 27, 2018 at 03:41 PM
Because Update runs as fast as it can and will almost never hit 3 seconds exactly. Check for greater 3 plus a boolean which you set within the block.
Your answer

Follow this Question
Related Questions
Weapon types in a 2d platfomer 0 Answers
Using conditional logic when updating a text field (efficient code question) 1 Answer
avatar making 0 Answers
Events triggered by button pressed. 2 Answers