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.

How do i make an object appear then destroyed after an object is triggered

Discussion in 'Getting Started' started by puffyjoe7, Dec 29, 2022.

  1. puffyjoe7


    Aug 9, 2020
    trying to make a jumpscare
  2. AngryProgrammer


    Jun 4, 2019
    1. If the object does not exist in the scene then you have to add it using Instantiate (
    2. To Instantiate object you need its Prefab (
    3. To destroy an object you use a Destroy method (
    4. You probably want to keep the effect on screen for some time, so you need to put a timer in between (look to answer:
    5. You bundle everything together in one of the trigger methods (e.g.
    Don't put everything together at once. Play with these elements to understand how it works. These are the basic elements that you will use many times.