C++ class is not displayed after reboot

Hello,

I have tried several times now to solve the problem, but unfortunately without success.
I have installed extra VS 2019 and also reinstalled UE5.
When I open a project and create a C++ class and then restart UE5, this C++ class does not show up until I recompile. I am using Live Coding.
Thought at first it is not a problem, but when the create a blueprint connected to the C++ class as parent, the blueprint is broken.

I hope someone can help me. I am in despair.

Delete the class and try again, it’s a hot reload thing, i would not know ue5 since i’m on 4 for now, but it does the same to me, I create a class and then it says hot reload has failed and asks me to compile again and the class fails to appear sometimes. Go inside the editor create a class from there and make sure the header from the compiler has enough memory to finish the job once it reloads the header, meaning you are out of ram and out of virtual space, so your hard drive has to have at least a few gb free to be able to finish the hot reload, what it does , it makes the class and then the header finishes but on it’s list it will reload again with the same amount of memory that it stalked up from building the class, so it’s out of memory and fails, it’s what hot reload is, so far I installed 2022 C++ tools and it no longer does this. So the header reloads with the same amount of memory it stalked up from building the class and now it tries to reload again to write the C++ class. Two operations with the same amount of memory, the last one being the write the actual class. If it runs out of mem it will say that it failed and you must recompile again.

So this is what I did, I deleted the class, just went to the source folder and I just delete the Cpp and header file and then restart and try again until the hotreload finishes and I get two operations with success and the class is written. This is if it runs out of memory and virtual memory so make sure you give it enough space, these things intelisense and all this other stuff plus the Visual Studio IDE eats a lot of memory so I just got rid of them, how much ram do you have ?

I’m also guessing since you are on ue5 you should install the 2022 dependencies, 2019 might not be enough for it and it just works with ue4 and it’s causing you problems on ue5. I had similar problems with some plugins where they would not compile with 2019 tools and I had to upgrade some packages that are newer and it worked, I got the plugin to build and compile.
Also make sure you create a blank class, nothing in it, if you write hundreds of code lines and try to, it will fail, so just make the class first without anything in it, just the bulk of the class, with it’s header having the actor api code and the project name attached to it.

Just this
UCLASS()
class ProjectName_API Classname: public AActor
{
GENERATED_BODY()
}

Then add everything afterwards in your fantastic compilations :slight_smile: Don’t forget the minimal class includes like generated core minimal …
Rest you add later after you create the class.