I´m using Linetracing to compare the names of the “Hit actor” with a String. So basically if the Hit Actor Name and the String matches further actions are executed. I wondered why everthing worked fine in the editor previews including the standalone preview while it doesn´t work in the final build. I figured out the hit actor name in the previews is the actual name of a mesh while hit actor in the final build outputs the ID. Now this is a bit of a problem as I need to change all may variables by hand if I make a test build and have to set them back to the name when working in the editor. Is there a way to eiter force the final build to use names instead of ids or is there a way to change the ID of a mesh to match the name ?
that’s an odd thing youre describing. but why aren’t you comparing the hit actor directly? instead of the string just look whether it equals the static mesh or blueprint youre searching for. or even easier just make a cast to your wished mesh / bp and on success execute your code.
My scripting skills are pretty limited. I have no idea, yet how to cast variables Regarding comparing the hit actor directly. As far as I can judge the hit actor is an array of strings that contains the names of the hit objects ? Well, anyway I just found a way around this problem. I just need to rename the objects twice, first to some dummy name and than back to the desired name. This will change the ID to the object name.
with a cast you can basically ask whether its from the type youre casting to or not. that’s what you need. if you want to ask the question whether the hit actor is the blueprint “XY” then you just cast to XY. if it succeeds, your hit actor is XY if not its something else.