Setting a static mesh component with a function call?

Hey there, one of the actions I want players to be able to take in my game is to hold an item when selected from the inventory. I have a static mesh component on my character for the held item, and when they press a hold button in the inventory UI I was going to set the static mesh component to the appropriate item mesh which I fetch from my item_data table.

The problem is that the mesh from the data table is a static mesh object reference and the mesh component from my character is a static mesh component object reference and I can’t connect the two. Can anyone provide some insight on how I can achieve what I’m trying to here?

The boolean just makes the mesh visible.

Like this:

image

The Static Mesh Component (node on the left) is holding onto a Static Mesh Object (New Mesh) which is the asset referenced in the Data Table. Essentially, you do not want to replace the component itself:

image

But the asset that can be assigned to that component.


The naming conventions make it confusing - both entities have the same name even though they are completely different things. The tooltips often help figuring out what’s what.