The variable declared has an invalid type class

The editor crashed before i could save a new blueprint class that im calling on in one of my blueprints, and now it wont let me compile it saying,
The variable declared in MyCharacter has an invalid type class.

However, the variable is no longer even on the list on the left of the screen i deleted the old blueprint that it’s refering to but with no luck, how can i fix this?

If you can still open the blueprint do a search and find and delete all references to the variable.

Otherwise, you might find some of the autosaves and go back before it was corrupted.

I have encountered this also in 4.4.2 and its incredibly annoying. So many corrupted blueprints… Why didn’t it just convert the variable to UObject or UClass? is there a way to “clean” the project or individual blueprints?

You need to duplicate the Blueprint that is throwing the error. The editor will catch the invalid type and warn you that it will be removed. Now delete the old blueprint. A window will pop up and allow you the option to replace the old references with the new, error free version.