Hi, It is possible to get all the attributes inside a mesh with an script

Hi, i have a project in unity in which i imported a 3D model, the same comes with some basic information of every component of the model… in unity avery object has a mesh and all the attributes are stored inside that mesh.

the question is it is possible get the meshed of an object and store and then retrieve these attributes?

i currently have this code, looks logical for me but i’m lost in the last step, idk if this is even possible.

    public MeshFilter canmesh;
    public GameObject can;
    void Start()
    {
        //if (can == null)
            can = GameObject.FindWithTag("can");

      canmesh = can.GetComponent<MeshFilter>();

    Debug.Log("CAN MESH", canmesh);
}

find attached a picture of the mesh attributes in UI

im trying to get locate the object - get inside the filter mesh and then print it, lol

any help?70202-mesh-attributes.png

Thanks,

Your question is very confusing as it’s not clear what you mean by attributes and where they are actually stored. If you just talk about the file name / name of the mesh of the imported model you can do:

MeshFilter mf = can.GetComponent<MeshFilter>();
Mesh mesh = mf.sharedMesh;
Debug.Log("MeshName: " + mesh.name);

If you talk about other attributes, you should be more clear what you mean and where they are stored / defined.