Why does the spline component reset after being created in blutility and moved in editor?

Hi there,

I wrote a blutility method which instantiates a blueprint class Something containing a spline component for every selected object with a spline component attached. So it’s basically a converter which converts splines into other spline objects.
Something doesn’t have any construction script code and the event graph is also empty. It’s only made of a spline component at the root.

Here’s the conversion code. You can also [download it][5] to test it yourselves. Should work by just copy-and-pasting the text into a blutility function.

It seemed to work well. When I convert a spline and select the new one, it matches its original.

If I move it however, the new spline resets to the default 2 node spline.

I have absolutely no clue why this is happening.
First I was guessing because of the UpdateSpline option of the AddPoint method. But changing that didn’t make a difference. Another guess would be the actor lifecycle but I have no idea what can go wrong there.

Thanks in advance,

Cheers

1 Like

Hello xadrin,

have you tried ticking the “Override Construction Script”, in the Spline tab of Spline Component of your Something class?

Cheers.

1 Like

Hi UE_FlavienP,

Yup, that was it.
Thanks very much.

Cheers,
Stefan