Automatically generate collider with Resources.Load at runtime

Hi all.
I want to Istantiate a GameObject at runtime using:

Instantiate(Resources.Load("my_3d_model", typeof(GameObject))) as GameObject;

The problem is that,in this way,I can’t generate any automatic Collider for my object.
What I’m looking for is a way to automatically generate colliders for my Object when i Import with Resources.Load,just like you can do in the Import Settings (checking ‘Generate Colliders’).
Any help is appreciated,thanks!

You only need to add the Component MeshCollider after instantiate the GameObject.
I’m sure it will work as I have an application doing it since 2012 :wink:

GameObject go = Instantiate(Resources.Load("my_3d_model", typeof(GameObject))) as GameObject;

go.AddComponent("MeshCollider"); 

Note that you need to “save” your instance in some variable to make changes later, as in this case the “go” used to add a component.