BP->Constructor graph-> Select node changes return value after re-opening project

I have a select node in BPs Constructor graph with 4 static mesh components as input. Every time when project is opened, return value of select node switches to scene component and you have to redo this part of BP graph.

Did not observed this bug in Event graph. Bug happens in Pawn BP, not sure if other actor classes are affected.

15672-select_node_bug.png

Hey BoredEngineer-

Which version of the engine are you working in? Is there a scene component in your BP anywhere? Also what happens when change the root component (to something like a billboard)?

Hi ,

Using latest stable - 4.4.3
Need to check but I don’t think I have them. What I have is 6 staticMeshComponent and about 12 text components.
I’ll try replacing root component.

I did not tried to replace root component yet - I have quite a lot of physics operating on it. But I got this bug just by adding another pin to select. As soon as I added new pin and connected new staticMeshComponent, warning on node appears and output is changed to to SceneComponent.

The index is coming from ForEachLoop… and I see what’s going on → two nodes where output is used are expecting SceneComponent and not StaticMeshComponent. Should I perhaps down-cast them before plugging in? They work as input right now so I didn’t bothered and forgot about it :smiley:
Sorry for that, should have noticed it.

I’m still not seeing the same thing happening on my end. What do you have plugged into the Index pin of the select node? Also, are you able to reproduce this in a new blueprint on a new project? Any information you can think of will help identify what is happening.

Hey BoredEngineer-

No worries. Glad to hear you figured it out. I’m not sure what behavior you’re trying to get but you could certainly try the down-cast.

I’m simply rotating some of the meshes to their “default” values which are driven by “configuration” structure rather than rotating them in editor. Unfortunately I see only two SetRelativeRotation nodes, one for Actor and one for SceneComponent. StaticMeshComponent works only with SceneComponent type of SetRelativeRotation node. I could down-cast them simply to avoid this behavior from Select node.

But how do I solve this long term? When I drag out connector from StaticMeshComponent and look for SetRotation or SetTransform nodes, the only results I get are for SceneComponent and not for StaticMeshComponent.
I don’t see any downcasting operation either…

Hey BoredEngineer-

Would it be possible to use a Rotator variable (one for each static mesh) and set it to the relative rotation of the static mesh in the construction script. Then when you make the selection of which static mesh you want to change the rotation of, use the same index to select the starting rotation of that static mesh to set it to. Here are a couple of screenshots illustrating my suggestion that you could use to fit your needs. The first is of the construction script to set starting rotation and the second of of the event graph where the call is made to change it.

Wouldn’t it lead to the same issue? → Select outputs StaticMeshComponent which is connected to SceneComponent input of SetRelativeRotation?
I think problem is that StaticMeshComponent != SceneComponent, it does work during normal editing. But somehow when you open BP first time after loading project, l assume, connectors between nodes are evaluated and SceneComponent input of SetRelativeTransform is propagated into output of Select node. Which invalidates input of Select node.

From what you are saying I would assume that “propagation” of connector type doesn’t happen in EventGraph and only happens in ConstructorGraph.

I’ll try it out as soon as I can, I could run part of the Constructor logic in EventBeginPlay as you suggest and see if connector types stay consistent.

While mousing over return value will show the tooltip of “SceneComponent” it should still function to move the static mesh that is set. If this is not the behavior you see then please let us know and we will continue to investigate.

Ok, I think we have a bit of miscommunication. I’m sorry if didn’t explained it clearly. English is not my first language and some sentences might be hard to :slight_smile:

Let’s start from the beginning. This is how my BP looks like while I work with the project in editor:

“Select” node have StaticMeshComponent as input and as output, everything is working just fine.

Now I close the editor and open project in editor again. This is how BP looks now:

So now “Select” node has StaticMeshComponent as input but output is “magically” changed to SceneComponent. Which throws the warning and I have to make new “Select” node and reconnect everything to compile BP. It will work till I save the project and open it next time.

Hey BoredEngineer-

You are correct that the select node saying “SceneComponent” after relaunching the editor is a bug. This has been fixed in an internal build and should be included in a future release of the engine. For the time being, even though the output says SceneComponent it will still function with the static mesh you have set as input.

Good to know that it’s fixed. Thank you, !