Call instantiated object from other script.

This is a very basic question.

Normally if I wanted to manipulate a non instantiated object (something initially in the heirarchy on startup) from a script, I’d have to attach it to that script by first declaring a variable, then dragging it across to the script in the IDE.

I can’t do that with instantiated objects obviously so how can I go about referencing them from other scripts?

use GameObject.Find : Unity - Scripting API: GameObject.Find

This searches by name. You can also search by tag :

Or a different method would be when you instantiate the object, assign that object to a variable on the other script. (otherScript.someVar = thisScriptCloneObj;)