Creating Spline Actor and attaching to Niagara user variable via Blueprint

Unreal Engine crashes when I try the following scenario:

I have a Spline BP that I’ve created and a Niagara system that is set up so that particles follow the direction of a spline. The Niagara system uses a User Parameter for the Spline (Niagara Data Interface Spline), which has two properties related to specifying a spline actor for the particles to follow. The first one, Source, can only select an Actor that exists on the selected Level. The second property, Spline User Parameter, can take a User Parameter as the value, but that parameter must be a UObject, which is then automatically cast to an AActor.

In the Spline Actor’s Blueprint, I have a spline actor and an instance of the Niagara system, and I also have a Begin Play function within the Spline Blueprint that tries to set the spline actor to the niagara user parameter that connects to the Spline User Parameter field of the Niagara Data Interface Spline. I tried using the Set Niagara Variable as String (Object) function and also tried the Set Actor Parameter function as well in order to achieve this, but UE 5.3 crashes when I do this. If I intentionally use the wrong User Parameter name in the Set Niagara Variable as String (Object) function, UE doesn’t crash, but when I use the correct string value (“User.SplineObj” in my case), UE crashes immediately when pressing play.

I’m pretty sure that Niagara is not able to attach the spline actor to the Niagara system during runtime, even though UE has an option to utilize Spline User Parameter for attaching splines to Niagara systems.

The purpose of doing this is so that I can dynamically attach Niagara systems to splines during runtime without having to manually place my splines directly on the level. I want to procedurally create splines that twist & bend via a Blueprint and have Niagara particles follow the path of the splines after they are created.

1 Like

Hi Mark,

Did you manage to find a solution to this?

I’m attempting the same thing (changing the spline parameter during runtime) and also finding that the editor crashes when setting the spline via an object

Figured this out:

  • Create a user variable in your Niagara system. Make sure it is of type ‘Object’. Give it a name. I use FXSpline

  • Make a scratch pad, add an input and set it to ‘spline’ type. Pull off a pin and sample the spline, then add whatever logic you want. (my screenshot is just an example)


  • In your Niagara system add your User variable to the Spline User Parameter

  • In Blueprint add a spline component and a niagara component. On begin play add a ‘Set Niagara Variable Object’ type. Set the target to your VFX system, set the object to your spline

5 Likes