I believe trace returns a FHitResult struct which includes a reference to the hit actor. From there you can use get component by class and find the static mesh and then you can get the name from the mesh reference. You can also as Everynone mentioned make an interface with a single function that returns the name on your actor, cast the hit actor from trace to your interface, call that function and use the value for your widget
2 Likes