Hi,
i have a simple structure with 2 arrays in it.
I have assigned it as a variable in a blueprint.
It all worked correctly, breaking the structure and looping through an array element of the structure worked correctly. Now after i’ve edited the structures default values, it doesn’t work anymore, all arrays are empty in the structure, in the blueprint. However the blueprint variable still show the correct values in the inspector, but in-game this values are gone and all values are empty.
But that’s only the case on one blueprint, in other blueprints this work still fine. It’s mysterious.
Currently it doesn’t work in a PlayerController Blueprint, but it still work in widgets.
Here is my setup - As you can see, the structure have correct default values, 3 elements for each array.
But in-game it’s empty, anyone have an idea? It happened multiple times in the past, i everytime fixed it with deleting all associations of the variable, deleting the variable itself and re-assign all again. But that’s a huge job for me and it shouldn’t be required, i guess. I also have an error in the output log when loading up my project. The structure definetely exist.
In general: I fill the structure itself with data and than i just assigning it to a variable in my blueprints (type is the structure), each blueprint have it’s own variable where i choose the structure as type of variable. I don’t change the values in a blueprint, it’s just a read process. I do the same in some widget’s and the player controller. It all worked perfectly until i’ve changed the values in the structure itself, now it’s broken in-game in the player controller, but in the blueprint it shows that everything (the default values) is correct. Only solution is to delete all associations of the variable in my player controller, compile it, re-create the variable with the structure as the type and than re-assign it to all break nodes again. But that’s not a solution, it’s a weird workaround.
Just a quick question: If it works in your widget but not in the controller. Does it use the same struct variable? Like are you just referencing your character to your widget and receive it from there or are you copying it through some interface?