Default setting of custom Struct changes when accessed in Blueprints

Hello there,

I’m currently using custom Structs to use the default setting of variables from this struct in different Blueprints. I only read the deflaut setting of the struct, so the value should not change. I noticed something strange. It seems like the value changes depending on which kind of blueprint uses it and which is the default setting. The Struct is not accesed somewhere else and in the Blueprint is set to “Read Only”.

Example(Default value is boolean):
Default Value: 0
Blueprint A reads: 0
BP B: 0

Default Value: 1
BP A: 1
BP B: 0

Am I using Structs wrong or is it conntected wrong or else?
Is there a workaround if no solution is found?

Thank you in advance

Just to check, can you show BPA and BPB reading it?

Sure. So I just set the Struct as a variable in both BPs. Then i get the Struct, break it and link the pin to a branch. I did this in both BPs exactly the same way but they behave differently.



That is weird…

Here is a screenshot of BPB while its running. You can see that the default value is true but on the branch the false is activated.

Hello? Someone having this issue or knows what i did wrong?

Can you show the rest of the code you have in BPB, what is happening there?

So this is BPB: Struct changes Default Value posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

So it basically just lerps to the actor if the struct value is true or if the custom event is called. I used the “Find References” for the Struct but it only appears once in this BP and its a get.

Sorry, absolutely no idea. If you can put a minimal project together somewhere that I can download, I’ll take a look, otherwise I’m bailing…

So I experimented a little and didnt get it to replicate. It seems as if only that specific BP in this project is messing up stuff. Im now not accessing the Struct directly but as a work around throug my PlayerController. This way i get the correct value at the cost of performance i guess.

1 Like