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

Enabling/Disabling Canvas destroy my instantiated objects

Discussion in 'Scripting' started by ramdok, Jan 7, 2016.

  1. ramdok

    ramdok

    Joined:
    Sep 9, 2015
    Posts:
    1
    Hi, i have a script that instance objects with a Coroutine, and in other object i have a script that enable/disable a canvas, the problem is that when i enable/disable the canvas the objects instantiated (clones) die.

    What im doing wrong?

    PD: what I want to do is to have a script that is continually creating objects, creating one and destroying it in like 5 seconds, and then create other object and so.
     
  2. Svarr

    Svarr

    Joined:
    Dec 20, 2015
    Posts:
    22
    Feel free to attach the scripts so that we can look them over. (Don't forget the code and spoiler tags.)
    We won't write your scripts from scratch.