Search Unity

Destroy prefab clone

Discussion in 'Unity Certification' started by gtennison2g, Mar 15, 2023.

  1. gtennison2g

    gtennison2g

    Joined:
    Feb 24, 2019
    Posts:
    2
    In 1 of the lessons that are offered, you are trying feed creatures with a slice of pizza, after you get everything set up and ready you are supposed to make the pizza shoot with space bar and than destroy the pizza clone as not to put to much strain on the memory. Problem is after re writing the code and re doing the entire mission from the ground up 10 times and a week of searching the internet for an answer I am forced to ask for help. when I run the destroy code and follow the lesson step by step I get the same result instead of the prefab clone being destroyed the entire prefab is destroyed and I can no longer shoot, I get an error on the console stating that the prefab I am try to reference is destroyed. Can anyone give me some assistance I tried so hard to solve this myself but alas I have fallen short on my attempts.
     
  2. gtennison2g

    gtennison2g

    Joined:
    Feb 24, 2019
    Posts:
    2
    I am dumb and had entered something that I accidently fixed when I deleted everything and started from the ground up lol