Search Unity

about spawning game objects:

Discussion in 'Scripting' started by diane69, Mar 17, 2019 at 1:30 PM.

  1. diane69

    diane69

    Joined:
    Feb 25, 2019
    Posts:
    4
    I am looking for a way to instantiate a series of the same game objects right at the beginning of the game, and then these instances will line-up after one another and behave accordingly to another scripted behaviour, only after the previous instance has finished its behaviour and the next one will do that same.

    Any idea please?
     
  2. WarmedxMints

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    505
    Spawn your objects in their desired positions. Have them trigger an event when they have completed their task and have the next object in the sequence subscribe to that event and starts its instructions then.
     
  3. diane69

    diane69

    Joined:
    Feb 25, 2019
    Posts:
    4
    Thank you, but would you mind provide something for specific? e.g. methods? or even examples will be great...