Failed to load c++ class (plugin) after editor restart

Hey guys,
I implemented a plugin that contains an abstract c++ parent class (InventorySlotUI) and a BP widget that inherits from it (SimpleInventorySlotUI) in the content folder. Another BP widget (InventoryUI) is using this and the first time I put everything together it compiles fine and it works also during gameplay. However, everytime I restart the project I get these messages:

If this happens the parent of my SimpleInventorySlotUI BP is NONE instead of my c++ class InventorySlotUI and cannot be opened anymore. If I remove the usage of it in InventoryUI and I restart the project it loads properly again.

When I try to open the BP I get the message even though I see the class in the editor:

Widget Blueprint could not be loaded because it derives from an invalid class.
Check to make sure the parent class for this blueprint hasn’t been removed!

I tried deleting all irrelevant folders and recompiled/rebuilded the project which didnt’ help.

Any ideas whats going on here? Not sure if this is the right section to post it.

2 Likes

After hours of troubleshooting I found out that I had to set the LoadingPhase of the plugin module to PreDefault instead of Default

"Modules": [
	{
		"Name": "Framework",
		"Type": "Runtime",
		"LoadingPhase": "PreDefault"
	}
]
1 Like

Thanks a lot. :laughing:

you are my hero! I spent a lot of time on this issue