Sorry for what is bound to be a silly question, but ImportMesh returns an array of meshes. I would like to add the ‘object’ that I have imported in a single reference as I need to access it later.
If I import an obj file which was exported from Blender, the array contains several meshes where each mesh in assigned a material BUT it needs to behave like a single mesh, for example if I need to move it. Only the first mesh in the array has the actual model name, the rest have some name that must be assigned when importing, but I think I can assume all the meshes belong to the same object. So I need to parent these so I can treat it as a single object.
If I import a glb file of the same object, I get a Default Light and all the meshes of the object. I don’t want to import the light into the scene. I only want the meshes for the object. They all seem to have the model name as the name on the mesh bit with _1, _2, _3 appended so I think it’s safe to assume the meshes are all part of the same object. Or is this not true. Again I want a single reference to an object so I can refer to it later (and move/rotate as a single object).
Or should I be using some other method to load meshes. The scene is dynamic and objects can be added/deleted/moved/rotated at any time by the user.