Download

Repairing broken blueprint: "The variable ... has an invalid type Map of Integers to Structures"

I am migrating from 4.23 to 4.24 manually (since standard way ends in hangup… gratz). I created new 4.24 project and moved c++ code first (there is bunch of structures defined). Then I tried to migrate (by Migrate… option in popup menu when you right click directory in old project) other assets from old project to new project, including blueprints.

I discovered UE cannot into recognizing structures defined in c++ within blueprints (enums too). All kinds of breakage happens. That’s… disappointing.

I had to manually fix everything, then reload blueprint and confirm removing invalid variables. That worked until titular map of integers to structures (should be map of integers to AreaStruc). This one simply fails compilation with message:

"The variable AllAreas declared in BackroomGen_BP has an invalid type Map of Integers to Structures"

This variable is not visible in list on left, but it does exist. If I try to create new var with same name, it will refuse. I can search for it using Ctrl+F, but I cannot do anything with result. I don’t know how to remove it - only way I know (reload blueprint, warning will show with option to remove invalid variables) does not work.

So, is there any way to repair this blueprint? I really, really do not want to recreate it from scratch - it is pretty large with a lot of nodes, functions, variables etc.

In case you still need a solution, or anyone looking for it, what worked for me was:

Right-click the BP asset on content browser Asset Actions -> Reload. Then Unreal will identify the corrupt variable and ask you if you want it removed (click yes)

4 Likes

@RCV2 the one post you made here has saved me from an hour long headache. Thank you.

In fact, my problem was saying “The variable ___ declared in ___ has an invalid type Array of Structures”. And it was fixed through this. Hopefully me including my problem’s text will help another person googling this obscure answer lol

This was really helpful for me also.

Thanks a lot.

It works for me too, at the beginning I thought it did not work but I had to compile the AnimBP then it was done. Thanks a lot