A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Visual Scripting' started by youma64, Aug 20, 2022.
On 2D game
please help me
A screenshot of the code :
This happens when you try to destroy a prefab instead of the instantiated object you made from the prefab.
This is the visual scripting forum here: https://forum.unity.com/forums/visual-scripting.537/
Dekker is correct in that you're trying to destroy the prefab template instead of the object that you've instantiated.
Use the Instantiate nodes output, which is the object you just instantiated and the cache it to a Graph variable with a Set Variable node. Then use Get Variable for Destroy node's input.