Greetings,
I kinda have an argument here. So I need to know, what would be better in a case of having different ways of spawning enemies and keeping these enemies in memories as integer variables.
Make each type of spawning confirm that an object has been correctly instantiated or make enemies simply confirm their existence when the awake?
Edit:
Here a more thorough explanation, perhaps I wasn’t clear enough. I keep tabs on my instantiated objects with an Array : Int with each Int pointer representing a certain object. This enable me to keep in memory Objects across several scenes, using a very low memory footprint.
So what I’m actually asking is, keeping in mind there’s multiples scripts that can instantiate these objects. Is it better to have each scripts confirm the existence of the object they spawned which get me to simply copy the same code across several scripts or simply have a script attached to my objects that let them confirm their existence?