Help with a way to set materials using Line Trace

Hi !

I’m new to Blueprint and it would be very nice if I could get some help from you guys.

The idea is to allow the user to walk around in a room filled with white objects, and let him assign pre-defined materials to those objects in a simple way.

Since there can be a lot of objects (eg. house interior) and lot of materials, my idea (thx to a nice tutorial from Titanic Games) was to use the FirstPersonCharacter to "shoot’ materials at objects.

The shooting part works fine, my problem is to find a way to allow user to select the material he wants to assign to an object.

I made a widget with buttons, one button per material. It could be a list as well. It will allow the user to select the material he wants to apply next.

I attached a screenshot of the LineTracing part. I’m stuck on “Set Material” : I’d like to make the link between the choice made by user in the menu (widget, button click) to this.

Would you have advices on what I should do or study next to achieve this result ?

Thx in advance !