Multiple script instances in a scene but need to access certain ones
Hi, so I am making a game where i having many different enemy spawners in the same scene in different kinds of rooms. The problem is on my enemy script I use the start function to find the enemy spawner to tell if the spawner is completed or not. The problem is I have many enemy spawners in different rooms and don't exactly know how to access the right enemy spawner depending if I am in a certain room. I can't just use FindObjectOfType. I've messed around with keeping all the spawner script instances in an array but don't know what to do from there. If anyone could help that would be massively appreciated.
Ok, so you want to find the spawner in the same room as the player, and there are many rooms with spawners in the scene, correct?
How are you identifying the rooms, to know what room the player is in, or the spawners?
Your answer
Follow this Question
Related Questions
Soundarray for player is not working properly 1 Answer
[Quiz Game] How to prevent Question asked twice. HELP 1 Answer
[HELP] Setting the parent of a transform which resides in a prefab is disabled 1 Answer
How to spawn sprites in a row randomly from a single array without double-ups 0 Answers
Save a custom Class Array 0 Answers