Access manually instantiated object

This is pretty weird. I will try to explain it as good as i can…

I have a prefab of an object called myPrefabObj, that have attached script named (prefabObj_JS). Let’s say that in the script i have this

static var isEnabled

 function Start()
     {
        isEnabled = false;
     }

Then i instantiate that prefab 2 times in the scene (By hand NOT by script), so i have 2 objects in the scene, which are instances of the prefab and they both are called “myPrefabObj”.

I have another object called “prefObjController”, which have script. In the scipt i write this:

public var myPrefabTrans : Transform;

function OnTriggerEnter(col : Collider)
{
	if (col.gameObject.tag == "Player")
        {
         myPrefabTrans.GetComponent(prefabObj_JS).isEnabled = true;
        }

after that i just insert one of the instantiated “myPrefabObj” objects in the prefObjController’s custom created variable.

The problem is that when i trigger the “prefObjController”, both instances of the “myPrefabObj” are getting changed their static variable “isEnabled” to true.

I got confused… I was thinking that if i make custom variable and insert one of the myPrefabObj’s into it, i will get controll only on that instance, not on all of them :\

How can i make it, so only the inserted instance of the prefab is getting controlled and NOT all of them in the scene…

Thank you…
Thank you…

static var isEnabled

Because you use a static var, remove the “static” then it will work as you expected