Why are my structs aren't connecting.

So i am following a tutorial, but at this point i can’t follow because my Structure pins wont connect. This is clear third person project. If i remove structure output pin and drag it from class defaults onto return node my engine crashes. I am using 4.19 version.

P.S. The funny part is that i downloaded full project from this tutorial, opened it with 4.19 and it works!!!. Why? Its driving me insane.


One thing to check:

First check what type of struct is in the output pin,
>if it is different change it.
>if it is the same then remove the item info pin on the return node, then drag the item info pin from class defaults across to the return node.

This may fix it if you have altered the internal structure of the struct since the creation of the return node.

very important to setup your structs completely before plugging them into arrays etc, otherwise you run the risk of breaking all functions running off those structs.

Dude it crashes the engine.

Try right click, split both struct pins, and plug in the values individually.

Don’t you think i tried that?

What type of variables are in the “Item Info” struct?

2 bools, bunch of text variables, enum and texture2d

Let’s see if I got this right. You can connect, but once connected and you “run” the game, the editor crashes. Yes?

Does your texture2d variable have a valid reference? How is it used?

What tutorial is this?

I can connect the pins, but if i compile they disconnect.
If i drag from “class defaults” onto return node for it autocreate, engine crashes.
So there is the link, the part that isn’t working is in 6:30.

Well, try doing it the hard way. Instead of getting “Item Info” through “Get Class Default”, get it directly from the class. You loss the dynamic aspect of the node, but at least it might work.

PS: The disconnection issue may be caused by a circular dependency somewhere in your code, which may be the cause of the crash. So, you probably missed a step.

The structure might be corrupted.

Try adding one member to the structure and remove it afterwards. (there is a “compilation” icon at the top-right corner of the structure pannel, it might indicate that the structure failed to compile).

Just recreate one from scratch and try.

If it does not work, maybe your Blueprint Function is corrupted. Create a new one and try.

If it does not work, make sure the Blueprint you are working on is not a child class of a Blueprint already implementing the function, if so that’s where you need to modify the output pin.

If it does not work, come back there!

I did, this screenshot was from project from scratch.

I want to say there is a refresh nodes option from one of the file menus but it’s been a while since I’ve had an issue like that.

If you have Blueprint Nativization enabled in your project settings, then disable it, I have been on issues when I change Structs and try compile the blueprints using them. Only activate Nativization after you are sure not going to change those structs again. It is not a fix, but a workaround that will make the crash at least to not appear. Don’t forget to send the data from this crash when the crash report screen appears (if it is appearing… :-/)