Unknown structure Error When Cook

I was getting the same issue in 4.19.0. The trick of renaming the struct variable, then immediately (no compile needed) renaming it back to what is was, then recompiling the blueprint did the trick! Well, then after doing it all, I exited and reopened the editor. And for good measure, fixed up redirectors. The last two sometimes fixing problems (warning—the very last, fixing up redirectors, has broken things for me in the past! esp. materials calling material functions that moved)

This solves it for me. Happens whenever I edit a structure associated with a save game.

Worked for me as well <3

UE 4.19.2

solved it for me v 4.20

This is a huge problem… Can a Staff create a bug report. So it get fixed in the next releases. This bug is known since UE 4.8 and still here 10-17-2018 UE 4.21

The structs need to save and recompile!
Or change the name and save and recompile. But it seems that every ref. also need a save and recompile, too.

the method of renaming all structs worked. this is still relevant in 4.20.0

1 Like

4.20 work well

This is STILL an open ongoing bug within the unreal engine and EPIC doesn’t know how to duplicate it. I can duplicate it by making a new C++ project in 4.21.1, setting a custom GameState and gamemode, making a new struct and datatable based on the struct , then writing blueprint code in the GameState that references the datatable. Then you cook all, then add a new row to the struct, then cook all again and BOOM . Undefined struct errors galore until you recompile blueprints or rename structs.

renaming my struct fixed it for me 4.20

4.24.3 checking in, bug still exists. This is still the easiest fix for it, thanks!

I had problem to Update project from 4.21 to 4.25 (Other versions were working properly)
I renamed my structures and update was successful. :slight_smile:

I have had this problem when I added a new variable in the structure, I tried to fix it with the solutions I saw in this post, but they did not work for me.
I duplicated the structure and tried to erase the original and replace the references with the duplicate, then a miracle happened, the editor gave me many errors and despite not closing it, it showed me a message with all the BPs that were affected and recommended me to close without saving, when I reopened the editor everything worked correctly and I was able to cook the project …

4.25.4 issue still persists. So far this is still the best way to fix it.

4.26.1 here. fastest fix is to simply go to each file using the struct and select “refresh all nodes” from the file menu.

the output log will pinpoint each file if you’re not sure.

3 Likes

Instead of renaming structs, try recompiling Blueprints where problem is caused. Worked for me…

All of the above posts are great, however not so much if you have a very large project, and it has several nested structs referenced everywhere. I found a solution which gives you the exact actor class, and the variable causing the error. I didn’t post this, I’m just reposting it because this page is much easier to find for others :slight_smile:

(Link - https://www.reddit.com/r/unrealengine/comments/l8qaa4/isshortpackagenamepath_error_while_packaging)

solved it for 5.0

1 Like

Very simple fix I discovered.

Change the variable type to anything, like Boolean, and then change it back.

So this is still a problem 7 years latter, the renaming the variable referencing the struct solved it for me

Still a problem in UE5 too