- Home /
Destroy a gameObject in the scene if instantiate the same gameObject
Hi there ! I have a little problem with my project. I'm making a demake (NES style) of Portal from Valve. my problem is when I shoot, a portal is created but if I shoot another portal, the other is still here. So how can I do to destroy the first portal if I create a second portal ? My second problem is that I have to first create the orange portal and then create the blue portal. So how can I make my script to create whatever portal I want first ? Here is my script attached to my portal : https://ibb.co/b6N89qq and my script attached to the Portal Gun : https://ibb.co/5cjtW54 Thanks to the people who will help me :)
Your answer
Follow this Question
Related Questions
How do I stop my sprite from jumping in the air? 1 Answer
Making the enemy follow the path of the Player,How to make the enemy follow the path of the player? 0 Answers
Exchange player position to only 3 possible places with a platform 1 Answer
so I'm trying to make a 2D platform but the first animation i make is the only one that registers 0 Answers
Instantiate a GameObject with a specific Z rotation 2 Answers