resting
1
I’m new to Unity and am confused as to whether there is a relationship between scripts belonging to objects in a parent-child relationship.
Example, I have a parent object and it has a child object under it. Parent is attached with a script parents.cs and child attached with children.cs.
Is there a relationship between parents.cs and children.cs?
Or, is the only way to have relationships between scripts if through scripting? That is, using the using keyword or others (not too sure).
There is no parent/child relationship between script that you write. The parent/child relationship is captured and used in the Transform (which is a component, just not one you write). From the script standpoint, having scripts on child objects (or parents) can make it a bit easier to find and use the script, but there is nothing special beyond that.
Using scripts on other game objects is always a two step process (though one or both steps can be hidden in some situations). First you find the game object that has the instantiated script (component), then you get the component:
http://docs.unity3d.com/412/Documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
http://docs.unity3d.com/412/Documentation/ScriptReference/index.Accessing_Other_Components.html