Setting a static mesh component with a function call?

Hey there, I have a static mesh component on my character for a held item. When they select they want to hold an item from the inventory, I want to fetch the item’s mesh from my data table and set the held item mesh to the appropriate item mesh. However, I cannot accomplish this because the mesh from my data table is a object reference while the mesh component on my character is a component object reference.

Can anyone provide some insight on how I can accomplish my intended goal? I’ve attached an image of my blueprint below.

You need to Get Held Item (instead of Set Held Item) from BP_ Character and then call Set Static Mesh and pass in the Item Mesh.

image

  • Held Item is a Static Mesh Component.
  • Item Mesh is just a Static Mesh.

Static Mesh Component holds a Static Mesh. So you need to set the Static Mesh property of the Static Mesh Component to Item Mesh.