Hello,
repro steps:
-
Create new blank c++ project
-
Go to Add New → C++ Class and create new class inherited from Actor. Name it MyActor.
-
Open VS and add this code in MyActor::Tick() function:
if (GEngine)
GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Red, “Tick from my actor”); -
Add #include “Engine.h” in MyActor.cpp
-
Compile from Editor
-
After hot reload create new blueprint, inherit it from “MyActor”. Name it BP_MyActor. Put an instance of this blueprint into the world.
-
Hit pie. You will notice message “tick form my actor” message gets printed. close PIE
-
Save all (Ctrl + s). Remove instance of BP_MYActor from world. Remove BP_MyActor from content browser. Save all
-
Go to vs. In solution explorer remove MyActor.h and MyActor.cpp from solution. (rightclick and “Delete”)
-
Go to project source directory. Remove files MyActor.h and MyActor.cpp.
-
Go to Editor. Hit compile button. Compilation is successfull
-
Create new blueprint, try to inhrit it from MyActor. You shouldn’t be able to do that but You can. Error.
-
You can even put instance of created blueprint into the world and see that “tick from my actor” message still gets printed. MyActor class still exists withing UnrealEditor even after removing it and sucsessfull recompilation.
thanks