Get name of mesh

You can access other components from with an actor and get their name. This might work?

Object->StaticMeshComponent->GetName()

or

TArray<UActorComponent*> comps;
Object->GetComponents(comps);
comps[i]->GetName/GetFullName

Hey there, I’ve been searching around for a way to return the name of a mesh/or similarly a uasset file name. GetName() on an AActor is almost what I need, but they are assigned a unique number on the end of the string for each individual actor (for obvious reasons). Is there a function that does this, or some method of retrieving this outside of calling a simple function?

you might have to parse those identifiers manually, because i doubt they would store 2 names for every object differing only by a numeric id.

Solved it by passing the “Get Display Name” node in a Blueprint to the function in question.
EDIT: Although, this doesn’t solve how to achieve this via C++, that remains unknown to me still.

Oddly enough, this didn’t return any components at all. I don’t know why.

I have the same problem, but that solution only solve the problem when you are in editor builds mode, but when you are playing the game you have the same problem.

How do i solve that problem?
I was wonderful if you or somebody can help me.