adding items to an array in game instance keeps breaking on Unreal restart or build

I’m not really sure what I’m doing wrong here, but this particular items is causing me a headache. I can’t build any packages, and every time I restart Unreal it break again. There seems to be an issue with the Add Item node.

As you can see in the image above, there’s an error on one of the add nodes. I have two to just switch between them when I restart Unreal. The error I get is:

“Error Can’t connect pins NewItem and Item : Spline Component Reference (by ref) is not compatible with Scene Component Reference.”

This seems silly to me because it’s saying a component is not compatible with the same type of component. That’s the only error I get and like I wrote - I simply disconnect and reconnect into the new one, compile and off we go… until the next time I start Unreal.

In this case, I’m trying to add the contents (some spline components) of a group within a BP into an array in my game instance.


In these types of circumstances I have had some success deleting nodes and recreating them, and in more extreme cases actually deleting the variables and recreating them as well (sometimes with a slightly different name).

thanks for the reply! I’ve tried the node deletion and redo with no success. But I’ll destroy the variable and try again this time. This is not the first time I’ve had this issue though.

unfortunately that didn’t work. :frowning:

ok, I got it working. I changed the variable type to Scene Component, but then of course, the end result was a failure because I need to retrieve a spline. So I checked around for some kind of conversion or test for component type, but what I found was a Cast To SplineComponent and fed the result into my spline input and it worked. A bit of a strange work around, but it works. I guess things like splines can’t be made into normal array types?