Get Object Name is different in package

Hello everyone!
I’ve been flipping this upside down for a while and it still puzzles me.
I’m using a LineTrace for objects that is checking what actor it hits. In this case, it hits the HandBP from the UVRF 2019 iNFINITE-CZ tutorial. It spawns two actors, HandBP0 and HandBP1.

Using the Switch on String module for checking the Out hit component, everything is good while in the editor. The hit result is “HandBP_C_0” and “HandBP_C_1”.

The problem is when I package this, the HandBP actors have a different name in the build: “HandBP_C_2147482533” for the left hand and “HandBP_C_2417482528” for the right hand…and these names are changing from time to time for no particular reason by decrementing the numbers.

My question:
Is there another way to check what hand the LineTrace hits? other than Get Object Name?
Or is there a way to set the HandBP name to something unique?

Thank you, Adrian

300286-ingamehitresult.png

Use tags, give objects identifiers, look into interface communication, cast, use enumerators. Pick your poison. You cannot rely on the names.

I will try all of this. Thank you!

If you have only 2 hands (who knows ¯_(ツ)_/¯ ), it might be enough to give one of them a tag and:

Great!
I will try it and let you know!
Thank you!

Alrighty! It works!
I will post here the solution:
After trying to add the tag “IsLeftHand” to HandBP, the tag was replicated also to the right hand. (Don’t know why).
Anyway, the workaround, probably not the best thou, was to add two sphere collisions to my pawn left and right hands and add there the tags “IsLeftHand”, “IsRightHand” for each sphere collision.
After that, I was switching the LineTrace Type Query to Pawn and now the Tags are passed.

Thank you soo much Everynone for helping me with this.