How do I store a public reference to a GameObject/GameObject's Component?

I’m using a GameObject named GameHandler with all game-related scripts inside (pause handler, inventory renderer…). Certain prefabs (not present in the scene) need to store a reference to these components (or a single reference to the GameHandler). Though, I can’t find the GameHandler using a script, as it is a root object in the scene.

So, is there a way to store publicly accessible references to objects, or do I have to find the GameHandler every time? If so, then how do I get it from the scene root? Or is there any other, much better way of storing game-handling scripts, which then can be accessed?


You want to use the Singleton Design Pattern.