How to change BP Actor in editor

Child Actor Component then for sure.

add/change that
BP actor directly from editor.

Normally you’d drop that actor in the level. But you’re after something else I reckon? Perhaps a Child Actor Component:

It’s a component that will automatically spawn the and actor from class. This way actors can have other actors associated with them, so to speak. This can be updated in the editor and from blueprints run-time. A component like this will manage the lifespan of an actor, and, if the class changes, the original entity is destroyed.

Add a Child Actor Component to the actor that has the Spline Component. Now your actor has 2 components - a spline and the abovementioned component that will spawn another actor who owns the particles.

Do tell if that’s what you’re after.

Good day,

The title might sound strange but I will try to explain.

I made a spline BP to create roads. Inside the construction script, I created a function that would allow me to edit the static mesh directly from editor so It’s not hardcoded in the BP.

Like on this image:

I wanna do the same but with other BP actor. For example, I combined some meshes, added few particles and created a BP actor. Now I wanna be able to add/change that BP actor directly from editor. I was not able to find solution to this yet.

Here is my construction script inside the BP editor. I highlighted the function to change static mesh from editor:

Looking for help on this issue.
Thanks in advance

I am actually making a spline.
And I have a BP Actor with particles and all, so I’d like to add BP actor to that spline via editor

Now that I’m doing it, I cannot even add BP actor as a spline component, only Static mesh.
Is BP actor even available as a spline component?

can’t seem to call BP actor to add to spline mesh component inside construction script. The only spline node I have available is “Add spline mesh component”.

I can add the child actor as you described but cannot connect it to any node that would interact with the spline

I don’t understand what you’re trying to do, sorry.

Are you trying to position actors along a spline?

I made a spline BP to create roads.
Inside the construction script, I
created a function that would allow me
to edit the static mesh directly from
editor so It’s not hardcoded in the
BP.

Makes sene.


I wanna do the same but with other BP
actor. For example, I combined some
meshes, added few particles and
created a BP actor. Now I wanna be
able to add/change that BP actor
directly from editor. I was not able
to find solution to this yet.

What is the relation of this to the spline? If it has nothing to do with the spline, what exactly would you like to change about this actor? Use a different mesh for example? Add new components?

On the right side, in details panel,
there is a slot for static mesh. I can
change static mesh at will, from
editor. However I cannot make that
slot to be Blueprint Actor. I want to
be able to change Blueprint Actor in
editor.

Well, look at the very the first image I posted. It’s a child actor component that creates an actor. That’s precisely it.


So inside this Spline Blueprint I want
to create a function that would allow
me to attach another blueprint as a
spline component. So far I was only
able to attach Static mesh as a
component.

Sorry, but this makes very little sense:

attach another blueprint as a spline
component

What does this mean? A Spline Component is a spline that has a bunch of points, tangents and other data.

How can you attach an actor as a spline component? Convert it somehow? Actor is an actor, and component is a component (that is a part of some actor). These 2 are not interchangeable.

A component can be wrapped in an actor, sure. That’s what you have already. An actor with a spline.


Do you want to add Spline Mesh Components?

331437-screenshot-1.jpg

Or do you want to attach other actors to the actor that has the spline component.

On the image, you can see a spline. It is a Blueprint for making splines.

On the right side, in details panel, there is a slot for static mesh. I can change static mesh at will, from editor. However I cannot make that slot to be Blueprint Actor. I want to be able to change Blueprint Actor in editor.

So inside this Spline Blueprint I want to create a function that would allow me to attach another blueprint as a spline component. So far I was only able to attach Static mesh as a component.

How can you attach an actor as a spline component

dunno if I can honestly. “Add spline mesh component” allows me to only attach a Static Mesh there, not another “Child Actor”.

Yeah, that was my thinking as well.

I’m building a road, which works great with static mesh.

But I wanted to go step further and create a lava via spline. Lava being a Blueprint actor with particles attached. I mean, basic lava with static mesh is good and works well, but lacks extra particle effects.

Thanks for your time man. You really went an extra mile for me. Appreciate it :slight_smile:

Of course. To attach an actor you need a Child Actor Component like I suggested.

  • if you want to attach a new Static Mesh you Add a Static Mesh Component
  • if you want to attach a new Spline you Add a Spline Component
  • if you want to attach an ENTIRE Actor you Add a Child Actor Component (and tell it which actor by class)

Here done dynamically in the Construction Script:

This way the Construction Script can add Child Actor Components who will then create actors of the specified class

And you can set that variable both in the editor and run-time.


Are we getting closer?

dunno if I can honestly. “Add spline
mesh component” allows me to only
attach a Static Mesh there, not
another “Child Actor”.

Spline Mesh Components allow you to deform an otherwise static mesh along a spline. (judging by your road, you know this well). They have absolutely nothing to do with Child Actors Components.


If you were hoping that you could use an entire Actor as a Spline Mesh Component and stretch it along a spline, then no, you cannot. That would never work and is not supported.

You could attach an actor to a spline, sure, but they will not deform. Only static meshes can do that thanks to the way Spline Mesh Component handles them.

However. I’m not sure what you’re planning but…

You could have an actor with

  • spline mesh component that represents a piece of road (or chunk of lava stream)
  • static mesh that represent a street light pole (or some rocks)
  • a spotlight (or a lava glow)
  • a particle system (for sparks, embers and smoke)

Then in the Construction Script of your road / lava actor, you add Child Actor Components that spawn the above actors and user their Spline Mesh Component as the road / lava stream.

This way you can have more complex, modular and highly configurable elements.

Have a look below. That would work fine for this.