How can I reference in a prefab's script a gameObject found in the scene

Apparently it lets me only reference other prefabs, but I am instantiating(don’t know if i’m using the word correctly, i’m referring to making gameObjects out of the prefab, like so ):

bullet = (GameObject)Instantiate (Resources.Load("Projectile"));

Is there a way to specify in the same code the parameter( it isn’t really a parameter, it is the public variable whose value we have to define), for a specified instance of the prefab, something like this ?

bullet.shoot.target = X;

In this example, shoot is the script attached to the prefab that bullet is an instance of, target is the public variable inside the shoot script, x is the name of the gameObject that we would use as a public variable in the script. The second part of the question is if there is a way of getting a list of all the gameObjects from a scene, being able to select which one you want by tags or by name, like so:

bullet.shoot.target = MainScene.getGameObject("Target");

//You can find object by name and access the public functions and/or variables like this:

GameObject myObject = GameObject.Find("ObjectName");
myObject.GetComponent<scriptName>().function();

//For a tag search

GameObject player = GameObject.FindWithTag("Player");
player.GetComponent<OtherScript>().DoSomething();

http://docs.unity3d.com/Documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
The script reference page is an awesome place :wink: