Branching, complex structs (structs within structs) can create some problems, but I think we kind of found a way to replace them when they get damaged without much trouble (Blueprints). Most of you probably figured it out as well by now, but in case you haven’t…
Symptom: the project no longer finds the structs as variables, and where they are already present, they no longer “break”.
Cause: Changes in related structs, renaming, or unknown;
Before doing this, make an archive of the project.
A
0. duplicate the damaged struct (not necessary to make a new one, the duplicate will be fine);
try replacing references automatically while deleting the damaged struct;
if it works, fix up redirectors, rename the duplicate, etc;
B
0. if not:
force delete the damaged structs (you may need to close/open the project); this may throw some errors, ignore them
rename so that the duplicate ends up with the original name; with a little luck, the previous, apparently failed “replace reference” will do the trick, the system will recognize the duplicate/identical name struct as the original.
replace the struct variable type in your data source at the most root level - first time it is used as “struct within struct”, and not just a collection of variables and enums;
Bump this as not fixed. Editing a variable in an underlying struct caused the entire project to become corrupted. Trying to set it right was uneffective, had to go back to a previous version.
I can confirm the problem still exists in 4.22.0-5660361+++UE4+Release-4.22. Variables of certain structs randomly null themselves when you close and reopen a project.
It says it’s fixed but structs always keep getting corrupted for me. ue5.1
After all these years waiting, I think I should give up and use a lot of arrays to replace my databases
The structure corruption bug has cost me an entire custom inventory system and a year’s worth of work. I wish i had known structures are this fuckdd up back when i started using them. I should have known they are too good to be true, being so easy to use.
Are there any alternatives? I was recomended data tables but dont they also rely upon a struct for the row structure? What if I modify that struct? Would the data table break too?
New to UE, on 5.3. I am on my first big project and did not know about this bug. Now my entire project is broken because of trying to change one struct. I am going back to Unity.
Hi, if you are here about your structs getting corrupted after a post-creation modification, i’ve managed to totally fix this issue by only migrating every content folder to a fresh project. It is tedious of course, but better than nothing i guess. Somehow this procedure will fix the modified structs references and connections. Let me know if that works for you too!
Engine Version : 5.3.2
Note that this may only work in case you only added a new variable/s to a struct. If you are removing or changing type of a variable inside a struct you should be aware that some problems may persist in your blueprints even after migrating.
Bumping thread because the problem is really bad still in UE5, it is the third time my project has been corrupted by structs. It usually happens with the main character blueprint, which can have many child blueprints, other things referencing it, being one of the most complex asset in the project, and usually it happens when modifying existing structs, especially one like an item property struct with many variables. If you’ve built inventory systems then you have probably ran into this issue.
The editor tends to give you an early warning that something is going wrong when loading the project and you see a single warning “Failed to load /Path/SomeStruct.SomeStruct Referenced by SomeBlueprint”. But when you click the error it takes you nowhere to fix it, and there are no compile errors, it’s green flags. This error will continue to linger and the project will work fine for quite a while, until one day it has a meltdown over that structure. The problem then gets worse when you try to fix it, resulting in the blueprint thinking it has variables which don’t appear in the editor anymore and cannot be removed, and now you’re going to be rebuilding that whole blueprint. It’s a total ■■■■ show and each time it costs 4-8 hours to patch up.
It looks like this problem or a related one was marked FIXED in UE4, but maybe it’s time to revisit that because it seems to still be a problem. Common wisdom is “do NOT use structs” but this is silly if you think about. Structs are a basic paradigm, they are as important as floats, and we need them to work!