How to compare a scene component (child) with an actor or object?

I want to know by comparison if an object or actor is attached to my pawn. However, the equality condition is never true. That’s why I think I’m doing it wrong. I even tried doing several castings. (to actor, to object, to scene component) but none worked.

How to do it correctly in this case?

My code:

Thank you very much!!

Ok, I did a print String and compared the displayName of both objects.

mesh is attached

If I’m not misunderstanding what is attached is the mesh and not the object itself. (I think)

In any case the comparison works if what I compare is the owner of the mesh. (As follows)

If I am wrong and someone has a correct explanation. Please let me know.

Thank you very much!!

1 Like