Communicating between objects without any physical connection?

I'm trying to find a way to send a message from one object to another without them having any physical interaction. There are no collisions, no projectiles, and they are not parented in any way?

What would be the best way to do this?

What I'm trying to achieve is a system whereby I can tell if something is within my camera's Field of View. And then whether that object is or isn't effect it's behavior accordingly.

Any help much appreciated. Thanks!

var allObjects = Object.FindObjectsOfType(GameObject);

for (var go : GameObject in allObjects){
    if (go.renderer.isVisible){ // if this gameobject is visible by any camera
        go.GetComponent(MyScript).DoStuff();
    }
}

Note that you could of course use FindObjectsWithTag or FindObjectsOfType(MyScript) or any other method of specifying what type of objects you actually want this functionality to be restricted to. Finding ALL the objects in the scene might get a little intense depending on what you have going on.

http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html

Find the object with GameObject.Find() and then use GameObject.SendMessage() to call a method in this object you want. This will call the specified method in any script attached to the GameObject you found. For example:

GameObject obj = GameObject.Find("player"); obj.SendMessage("Hit");

This will find the object named player and execute any or all methods called Hit in any script attached to the player gameobject.

If you want to simply manipulate the gameobject you found, just use the methods in the variable obj (in the case of the example above)