How to display a variable value from object you look at ?

For now i solve my problem by make a tree of casting to all bp and grab variable from there.
In here raycast hit target > target become reference > if reference equal to cast bp that is called manually , take var from it