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)
@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
I had a variable that was invisible, but linking to a struct I wanted to delete and this solved it. Deleting the struct crashed unreal. I hope more people find this! Thanks!
This worked for one of my variables. But not one where the broken struct was the value in a Map(dictionary)
I had two variables fail to load after a botched redirectors-fixup.
- Map<BrokenStruct, var> As Key, opening/reloading the blueprint prompts me to delete it which is a (terrible but workable) solution to my problem.
- Map<var, BrokenStruct> As Value, opening/reloading the blueprint does not prompt me to delete it. There is the message about
invalid type in the console log but no way to fix it.
A better solution would be if these variables showed up in the outliner still so we could change their type.