object pool - how to use it / best practice

hi..i have a question about tracking the objects in the scene. i have a lot of objects in the scene, i would like to know what is the best practice to track their state

here is the example of what structure i have in the scene:

Root
    ObjectGroup1
           ObjectSubGroup1
           ObjectSubGroup2
    ObjectGroup2
           ObjectSubGroup1
           ObjectSubGroup2
    ObjectGroup3
           ObjectSubGroup1
           ObjectSubGroup2

every group and subgroup have meshes, colliders, etc... so far i was checking the state of the object and other things by getting the component that is attached to the script and reading the values. so every object have script attached to it, where i have values, for example transparent,hidden, value for alpha and other things...

is there a way to get the list of all objects and maintain their state in array. so every time i need to get the state or value that is specific for object i search for a name in the array and read its values?

can somebody point me in the right direction or provide examples, it would be appreciated.

thread at forums: http://forum.unity3d.com/threads/79266-object-pool

If I understand your question correctly, I'd probably differentiate them by GameObject name. You can change that as you create them in the Editor or when you instantiate them using Object.name, ie

//JS
var newObject = Instantiate (myObject);
newObject.name = newObject.name + " " + someUniqueId;

Then put them in a Dictionary

var myObjects : Dictionary.<string, GameObject> = Dictionary.<string, GameObject> ();

and when you instantiate them

var newObject = Instantiate (myObject);
newObject.name = newObject.name + " " + someUniqueId;
myObjects.Add (newObject.name, newObject);

Then you can access them by name with

myObjects[nameToCheck];