Struct Problems After Altering Variables

I’m encountering some issues with Structs and making changes after they’ve been utilized in BPs. The Structs I’ve changed have not had any variables removed that were used, just unused ones or adding new variables. Is this possible to do without it being a nightmare?

Every time I load my project now, I receive messages like “Failed to load “…S_XXX.S_XXX” Referenced by XYZ”. The structs I’ve changed are saved and error free, with the checkmark next to +Add Variable that says “good to go” in the hover tooltip.

The blueprints that allegedly failed to load the structs are also compiling and functioning fine as far as I can tell. All the nodes are properly connected and the added struct variables are not interfering in any way. Does this mean the error is a false alarm? Is there a way to resolve the error besides flat out remaking my blueprints from scratch?

Also, will this result in problems later on when attempting to package my project?

Thank you for your time and help!

1 Like

try checking the locations where the struct is used. I’ve noticed that if you change the base struct, the content where these structs are used gets reset. The content vanishes.

I’ve checked. Fortunately, all of the nodes and content are still there along with anything related to the struct supposedly having issues. Compiles like normal. It’s very weird. I’ve even gone so far as to delete the entire functions utilizing the struct and remaking them from scratch. As soon as I use the struct again, the error reappears on opening the project.



1 Like

maybe try to delete all the intermediary files and the rest the engine create for the project? there are some folders that can be deleted which will then be recreated when opening the project. I don’t want to create issues as I don’t know exactly which one can be deleted or not. Do some research, make a backup of the game, archive the entire thing if is not too big. Then delete those folders

I’ll definitely look into this. Think I’ll also try to package the game and see if it suddenly has issues that weren’t appearing in the editor window when testing. Thank you.

For the future, is there some way to alter structs that are in use without problems? Or are you typically supposed to leave structs alone after they’ve been made and used in your project?

No luck on deleting all the intermediary files. I backed up, and went so far as to delete every single folder besides content and the .uproject file. Deleted the “Developers” folder inside my content folder too. Opened with the .uproject, had it rebuild all the other project files/folders. Still having the same error pop up :frowning:

I’ve had an issue with a data asset which I’ve renamed or maybe moved to a different folder. All worked fine in the editor, but it didn’t want to package the project. Always failed because he was not able to find that data asset.

In the end I’ve create a new data asset, recreated the variables identically, then I’ve replaced everything where was used. Fortunately there were few of these places because I’m doing some test and i don’t have a lot of data.

Then it builded correctly.

This is just very weird. I can’t imagine I’m the first person ever to make changes to a struct down the line in a project. Feels like a very reasonable thing to want to do as your project evolves.

Looks like I’m in the same spot. Tried to build and package. It couldn’t find the struct despite me trying everything I could think of to resolve the problem… Lots of wasted days and going to take a lot more to fix given how widely used my two structs were (iteminfo and slotinfo so you can imagine it’s in everything)… Unfortunate.

Note to anyone who ever reads: Don’t move or alter your structs once made and used in blueprints. It will cause you nightmares to fix. Add variables to the struct from the start that you may never even use in the end, because going back to add them can break things.

1 Like

I’ve used that solution because I’ve had like 5 locations to update. It made more sense to just remake everything instead of finding a real solution

1 Like

In UE 5.1 this is still a problem.


5.2 this is still a problem.
now It says the unknown structure and I can’t build anymore.
스크린샷 2023-05-25 172733

I have a fix for this issue, but not a solution unfortunately. As we all know, altering a Struct breaks blueprints, even though they compile. Any nodes that reference the struct, need to be refreshed.

You’ll need to go to each output log error, find where the Struct is referenced, and I’d recommend selecting all nodes in that graph or function, right click > Refresh Nodes > Compile. This will fix the errors. The only way to check if it’s been fixed is to try cooking the project again. Keep doing this until you’ve corrected all errored struct references.

All that being said, it’s a huge pain in the *** and hopefully can be resolved in a future update to the engine.

1 Like

this worked, thank you!

1 Like

For people who might come to this forum later, I found another solution of the refresh > recook solution doesn’t work out for you.

I actually recreated another struct in my .h file and recreated another variable in the concerned class.

This worked pretty well but I had to replace every references to the ancient variable in the Blueprints. Hope this will be fixed soon enough …

Update to this thread. If your struct is created via the UE Editor (BPs), you can simply change the name of the struct. Once changed, all errors should correct on a new cook. No need to go in and refresh.

This tends to happen so often with structs whenever they’re edited in any way possible. The solution that worked for me was, whenever I would edit the structs, I would click the save icon for structs, then I would close Unreal and click on Don’t Save when it asked to save the other changes. Then reboot. Used to work every time

1 Like

Hopefully this will resolve in the next version because it cost us a lot of time in resolving errors like unkown structure. Thank you.

Simple solution and it works for me. Go to the struct with a problem, add a dummy Variable, delete it after, and then click the save button. Follow it by File>Save All, it will recalculate and resolve some errors. Remember to do this by hierarchy, start it with the child struct/ sub-struct then go to the higher struct, and so on.

blueprint structs are the devil and have been broken since the dawn of time. We have no reason to expect a fix. :frowning:

I’ve ditched them ‘almost’ completely and just use data objects or data assets

1 Like