Question by
gustavim15 · Oct 01, 2016 at 08:46 PM ·
arrayscenelistfindfindgameobjectswithtag
Find GameObjects With Tag only in a scene.
I'm loading a scene, and putting all my enemys at an array, using FindGameObjectsWithTag("Enemy")... But I'm loading this scene in additive mode, and this Find is getting all enemys, including of others loaded scenes. How can I find only in this scene which I'm loading?
Thank you.
Comment
You may not like this but since you want to use additive mode then I suggest making the enemy tags unique to a scene. For example (EnemyA, EnemyB, EnemyC...).
@$$anonymous$$avina always helping me :D
Yes, It could be done... I was thinking in store this array of enemys on a list, and then, when I find for enemys in a new scene, I check if this enemys contains on that list. If no, so they are the new enemy. Do You think it could work?