Using Static Mesh Instance for Spline Mesh Component

Simply said, I want to add a mesh component to a spline, but have this mesh be determined by whoever is using the blueprint the level editor, rather than have to go into the blueprint construction script- find the node- replace it there and recompile the blueprint.

Is that possible?
Currently I am stuck at actually providing it the input to the node since it wants an actor instead of the mesh?

1 Like

Like this?

or

splm

4 Likes

You can do it with a Static Mesh (asset), as above. But not with an Instanced Static Mesh Component.

1 Like

I think by ‘mesh instance’, the OP means ‘a mesh’ ( as you probably guessed ) :smiling_face:

I meant this, OP is feeding a component into a component:

If we’re using ISMs, perhaps that’s what was needed:

image

1 Like

Ah yes, see what you mean…

Got a call from work so I couldn’t answer any sooner, but yes that Is what I was trying to do, because from my limited understanding I assumed that using instances would be more efficient?
Since its essentially creating a new mesh along the spline. Unless it boils down to the same thing?

Essentially, instead of setting the Mesh inside the node details, I want to provide it through a parameter.


But that being said, I don’t think I can input a static mesh into the node.

But I think what @ClockworkOcean posted above may be what I was looking for by giving the target to a set static mesh node?

1 Like

Yes, you set it in the level

because you make the variable visible

image

1 Like

Yes that was indeed what I needed to do, good to know I can do that, I was too focused on how to provide the input directly to the Spline Mesh Component node.

Note the word component - it’s a like a module we add to an actor:

  • a Static Mesh Component - displays a Static Mesh
  • an Instanced Static Mesh Component - uses a Static Mesh to create many highly performing instances - think of them clones
  • a Spline Mesh Component also needs a Static Mesh and applies tangents and whatnots to deform it

Static Mesh is the asset you import into the engine for other components to use.


In short: Components use Static Meshes to do their special things. A component cannot use another component for that.

If an actor is a chest of drawers, components are drawers and static meshes are the contents. You can’t put a drawer into another drawer. May be a stupid example but that’s the first thing that came to mind :innocent:

3 Likes

Got it does make sense, no worries about the example :+1:

1 Like