USkeletalMeshComponent question

Does anyone know what they call the parts of the mesh in code. Lets say i have 4 sides to my mesh what do they call each of those pieces in code? or those mesh pieces that make my full model. What is the TArray name that is used to hold them.
Been looking for days now.
Can not seem to find this in code and i know it has to be there. Any ideas, anyone?

Can you be more specific? What “parts” of the mesh are you referring to and what are the 4 “sides”? Are you talking about modular characters? Did you create a character in Blueprint and want to access components in C++?

How more specific can it be, then that? OH boy, ok so lets say i have a box there are six sides to the box. each has a different texture, so when you import the model it comes in as a full model but each side is a separate mesh containing a different material. What is the names of those meshes called. I am looking for the TArray that holds them.

While waiting for someone to answer. I figured out another way to accomplish what i was after. So this is not important anymore, but if some one knows. It would be nice to know for future reference.

Each side is not a separate mesh containing a different material, each side is a collection of polygons on the same mesh that are assigned material IDs. They are also called “sections”. Maybe you should ease up on the snark a little.

You can access the materials via the GetMaterial family of functions:

UPrimitiveComponent::GetMaterial(int32 ElementIndex)
UPrimitiveComponent::GetMaterialFromCollisionFaceIndex(int32 FaceIndex, int32& SectionIndex)
UStaticMesh::GetMaterial(int32 MaterialIndex)
...

You can get the sections of a mesh by using the GetSection family of functions:

UStaticMesh::GetNumSections(int32 InLOD)
UStaticMesh::GetSectionInfoMap()

There’s also the Blueprint function Get Section from Static Mesh which returns the vertices, triangles, UVs etc. of the desired mesh section.

1 Like

HAD TO REPEAT MYSELF TWICE! and thanks for the info. but as i said, i figure out how to do it another way.

That is what i was looking for. I thank you kindly.

You can get the sections of a mesh by using the `GetSection` family of functions:
UStaticMesh::GetNumSections(int32 InLOD)
UStaticMesh::GetSectionInfoMap()

Nice info to have.