Failed to add new C++ class

Hello! I was trying to add a new class that inherits from ACharacter. When adding Live Coding logged: “Error: Live coding failed, please see Live console for more information.”
However, before that, I added classes inherited from UObject and everything was fine.
My class is not displayed in the content browser. And it can’t be assigned to the DefaultPawnClass for the Gamemode. Why?

AMyGameGameModeBase::AMyGameGameModeBase()
{
HUDClass = AMainGameHUD::StaticClass();
DefaultPawnClass = APed::StaticClass();

}

yep live code fails, if u add a new class from the editor, close all, go to your project folder and Generate Visual Studio, re open your project, that should fix it, and your C++ class should appear.

2 Likes