SplineComponent no longer visible in game in 4.3

It looks like your change for SplineComponent from a PrimitiveComponent to a SceneComponent has prevented in-game rendering of the spline from functioning.

In 4.2 I could add a spline component to an Actor and set the appropriate flags in the viewport to show splines, call MarkRenderStateDirty, and have the spline visible in the game (I’m using it for realtime visualization of player movement).

Upgraded to 4.3 yesterday, the ability to set the spline’s color is gone, and the spline is no longer visible in game, even just a simple Blueprint Actor with a Spline Component added does not show up.
I’ve :

 set Spline->SetHiddenInGame(false);
set ViewClient->GetEngineShowFlags()->Splines = 1;
called MarkRenderStateDirty() on the Spline;
used the 'Show Splines' console command;

all to no avail.
I’d think that it was something to do with SceneComponent’s definition of MarkRenderStateDirty() being different to PrimitiveComponent’s one, but that shouldn’t have prevented my blueprint-created spline from rendering because its spline data would have been set before anything was rendered.

Setting the spline color should be simple to add back in again, but I can’t see the spline to verify that my changes are functional.

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.

If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.

Thank you

Golding mentioned that SplineComponent might be reverted to a PrimitiveComponent in 4.5, so I downloaded the latest preview build from the launcher. No such luck.

Steps to repro:

Create new blueprint first person template

Create new Actor blueprint

Add Spline component

Place in level - Spline is visible in editor viewport

Play and use command ‘show splines’ → spline component doesn’t render.

I’ve verified visible/show in game is set correctly.

I’d be happy to make and submit the relevant changes myself if it actually hasn’t been implemented. I would imagine that by and large I could simply change it back to a PrimitiveComponent and restore the definition of the appropriate scene proxy from 4.2, but I’m not sure if this would interfere with the in-editor spline visualizer you’ve implemented since then (I’m guessing it would).

Hey,

I’ve reproduced this problem and added it to our internal tracking system (TTP #348722) for further investigation.

Cheers,

We moved the spline rendering code from the component itself to the FSplineComponentVisualizer class. This lets us do all the cool stuff with editing splines in the level. Spline’s now are really intended as a shape that drives some other behaviour, whether it is deforming meshes or animation/spawning other objects. It is no intended as a rendering primitive itself. As was mentioned, we do plan to change SplineComponent back to a PrimitiveComponent at some point, but that is to allow derived classes to implement custom rendering code. Sorry that didn’t make 4.5! I hope that helps clarify things.

Thanks for clarifying the situation - in theory then I could get your old rendering code from 4.2 and implement a subclass which would be renderable in-game, then?
As I mentioned to you a while back, I’m looking at using this to visualize player movement through a level over a gameplay session. In other words, it’s intended for in-game use, but only during development rather than in shipping. If it wouldn’t be feasible for me to use SplineComponent for this, whenever the change goes in, are there alternatives you might suggest I investigate? I can split this off into another question, or else a forum post, if you prefer.

Hello here,
Back on that topic as I fail to display my spline comp in game, was wondering if the information presented here are still relevant about it ?!

Hey Theblacktiger-

There have been updates to how splines are handled since this post was created. If you’re having an issue and the information in this thread isn’t helping solve the problem, the best solution would be to create a new post with as much detailed information about your situation as possible.

As of Unreal 5+, I found it through console command ShowFlag.Splines 1. And then use 0 instead of 1 to hide them again during play.