Interact with objects from Resources.Load

How do I interact with objects loaded from the resources?
I have an empty objects on which I have attached a box collider, a script that rotate the object with mouseclick and finally a script to load the real object taken from the resources:

#pragma strict

public var model:String;
function Start () {
var instance : GameObject = Instantiate(Resources.Load(model,GameObject),Vector3.zero,Quaternion.identity);                                       
}

Everything works well when using internal objects, but when I load from resources it will only display the object without the possibility to interact.
Is there another method to interact with objects taken from the resources?

Please help!
Many thanks

I had a somewhat similar problem just 2 weeks ago. I’m assuming that the interactivity comes from a gameobject that you define. As in drag and drop from the hierarchy onto your script?

The problem is that when you instantiate this object the script doesn’t know which object its behaviour is coming from.

The normal object I’m assuming is the child of the empty GO.

var model: String;
var emptyObject: GameObject;

function Start()
{
   var thisObject: Gameobject.Instantiate(Resources.Load(model, GameObject), Vector3.zero, Quaternion.identity);
   //please tag your empty with whatever you want. I'm just using Parent
   emptyObject = GameObject.FindObjectWithTag("Parent")

   thisObject.transform.parent = emptyObject.transform;
}

I partially solved the problem with this:

#pragma strict

public var model:String;
function Start () {
var instance : GameObject = Instantiate(Resources.Load(model, GameObject),Vector3.zero,Quaternion.identity);
instance.AddComponent(BoxCollider);                                     
}

but I don’t really like the idea of having to create a box collider from script I simply would like to access the one I create in the inspector

I guess your empty gameobject should be some kind of placeholder for the object you load from Resources. You might want to make it a child of your empty Gameobject once you instantiated it. Because at the moment your instantiated object is on it’s own and has nothing to do with your empty gameobject:

// [...]
    var instance : GameObject = Instantiate(Resources.Load(model,GameObject),Vector3.zero,Quaternion.identity);
    
    // make it a child of this gameobject.
    instance.transform.parent = transform;
    
    // move the child to local 0,0,0 inside the empty gameobject
    instance.transform.localPosition = Vector3.zero;
    instance.transform.localEulerAngles = Vector3.zero;

// [...]