find mesh by name in assets folder

im a little new to unity. there’s an .obj file in my resource folder called “cube.obj” and i want to load it into the mesh collision of an object. I’m trying

MeshCollider col = cube.AddComponent<MeshCollider> ();
col.sharedMesh = Resource.Load("cube") as Mesh;

Nothing happens. when i check the scene and examine the gameobject (its a cube) and i check the meshcollider, the mesh field is None (Mesh) instead of Cube (Mesh)

also keep in mind i dont understand C# that much.

I know this question is a bit old, but for anyone needing, this is the code I used to get the default Unity cube mesh (it gets the first mesh with the name):

Mesh cubeMesh;
			
Mesh[] meshes = Resources.FindObjectsOfTypeAll<Mesh>();

for (int i = 0; i < meshes.Length; i++)
{
	if (meshes*.name == "Cube")*
  • {*
    _ cubeMesh = meshes*;_
    _
    break;_
    _
    }_
    _
    }*_