Get reference to persistent object without inspector.

So I have a persistent object called Time. I want other objects(prefabs) to have access to its variables but the other objects wont be persistent, I have hundreds(maybe even thousands) of objects that need to access it I cant assign them through the inspector because they are not instantiated yet(and may likely be destroyed or moved alot) and I doubt using gameobject.find is a good idea.

I keep seeing “if your going to use an object alot keep references in those objects”, but how do I do that without assigning in the inspector?

You can make a manager where you can assign this object (drag and drop in the inspector). In this manager get the script component of your Time object and make it static.
When you need to access the time component, just call Manager.timescript.variable. Be aware that all the variables / methods you want to access should be marked as public.
Another solution will be to make inside your Time script a public static TimeScript Instance, assignt it in start and then access it like this: Time.Instance.variable.

Use a singleton pattern for your Time class, making it publicly accessible to all gameobjects in the scene: Loading...

Thanks for the replies I recently discovered singletons that seems to be what I want, if I have the Time object as a static class that wouldn’t work would it? Because I have variables constantly being updated.