Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Delay gameobject appearance?

Discussion in 'Scripting' started by CaptCanada, Dec 4, 2015.

  1. CaptCanada

    CaptCanada

    Joined:
    Feb 3, 2013
    Posts:
    272
    Hi all

    I have a creature that will walk around my map and would like to know if there is a method I can use to delay when it appears in the level and starts walking around?

    Right now the creature is in the level and starts walking around. I'd like to randomly set when it is loaded into the map.

    Thanks
     
  2. Jordi-Bonastre

    Jordi-Bonastre

    Unity Technologies

    Joined:
    Jul 6, 2015
    Posts:
    102
  3. RPP

    RPP

    Joined:
    Nov 11, 2015
    Posts:
    28
    I believe you could write a simple if(statement) for example maybe? if(Time.time = 120.0f) {load my object here} or if you want to start loading when the level has loaded use, " Time.timeSinceLevelLoad = 120.0f " time is measured in seconds.