How do I convert StaticMesh Object to a Static Mesh component variable?

I have a data table whereby it lists various static mesh files that I want to reference from my blueprints. But the data extracted is a static mesh object instead of a static mesh component variable. How do I convert it into a static mesh component?

Additionally, if I change the datatable struct to be static mesh component instead, it doesn’t allow me to key in my static mesh file references data. Only as static mesh object, it works.

You cannot. They are 2 utterly different entities that work in tandem.

  • Static Mesh is an asset you’ve loaded into the engine, it can be referenced by a DataTable for example
  • Static Mesh Component is a part of an actor that handles that Static Mesh asset

You can assign a static mesh to a component from the dropdown, or dynamically using nodes:


The confusion often stems from the naming conventions. By default the Static Mesh Component is called:

image

But it is, in fact, the component. It can be renamed, it’s just a user unfriendly name in this instance.


Think of the Static Mesh Component as of a picture frame, while the Static Mesh is the canvas. Having one without the other does not really work. Not sure if that’s the best analogy. Hope it makes sense.

3 Likes

Cheers for the reply!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.