I have a scene with a number of objects and one is empty to which I’ve attached a script. The script is not attached to any other object and there are no other references to this empty object or script anywhere. When I play the game, however, the script executes. I don’t understand why. I’m fairly new to this so I’ve probably missed something but I would appreciate it if somebody could put me straight here as to why this is happening.
If you put a gameobject into a scene and it has a script attached, it will run the script. It doesn’t matter if you created the gameobject as empty or not.
If you’ve attached a script to it then it isn’t empty. GameObjects are only truly empty when they have nothing attached to them (ignoring the transform component which is automatically added and can’t be removed).
Th
Thank you. This I didn’t know. I thought I needed some kind of trigger on the object. Thanks for putting me straight.
Thank you for response. I’m wiser now.