Problem with default values of variables being reseted

I posted a coment on this bug here:
https://answers.unrealengine.com/questions/179108/problem-with-default-values-of-variables-being-res.html
but noone answeres, so i’l try to wright it as a question:

“I still have a similar bug in 4.7.3. I use structure blueprint to store integer arrays, then in child actor construction script i set parent array as one of structure file arrays right before parent construction script. It works fine in PIE, but in standalone preview array length = -1. And I also have circular dependency problem. I tryed to solve it to make everything linear but one of blueprints still decompiles when I compile mentioned parent blueprint.”

Hi axess21,

Could you post some screenshots showing exactly how you are setting this up or include a small text project that has the error?

Here are screenshots, i’ll try to make a small text project with same bug now

link text
Here is a small Project with this bug. Array length = 4 when Play in editor, and array length = 0 when play as standalone game

That test project allowed me to narrow down the issue. This is actually a known bug that has been fixed internally. Unfortunately it didn’t quite make the 4.7.4 hotfix build but you should see it by the 4.8 release.

I don’t exactly have a workaround for you but it’s has to do with getting a value from an Array that is contained within a Struct. Using this method always returns 0 in Standalone mode. However, this error isn’t present in a packaged project so you should be fine to continue developing with this method in place.

Cheers,

TJ

Thank you! More reasons for 4.8 hipe)

I got the same problem with 4.8.2. In about 1 of 5 cases on editor load all class values of a derived class are set to their default values and I have to restore a backup version.

Hi ,

This specific issue was fixed in 4.8. I’m thinking that you are encountering a similar but slightly different bug. Could you post it as a new report and include repro steps and/or a small test project?

Hello everyone, I’am from 2020 year, use 4.24 version and still have the same problem with variables. And it’s make me frustrating.