activate UMG on mouse click when pointing at an object

Hello,

I’d like to know how can I open a specific UMG depending on which static object I’m pointing (look at) at the moment in runtime.

Something like the dynamic DOF video:

where instead of the changing DOF I’d like for the object that I’m pointing to, to be able to open a specific UMG on mouse click.

I’m trying to make an asset that can have it’s material changed in runtime.

Thanks

Please can anyone help me…