I’ve been trying to add a simple C ++ class array for some time. Everything seems to be fine, no crashes, no errors, nothing at all … until you decide to restart the editor. The editor remains stuck at 75% when restarted.
If I delete the class with the C ++ class array, the editor loads completely.
The error only happens with one C ++ class, all other classes do not cause any errors.
I solved the problem some time ago with the forward declaration.
Basically I included the c ++ classes in the headers.
Wrong behavior (thisclass.h)
#include "class.h" // wrong behavior
#include "thisclass.generated.h"
UCLASS()
class GAME_API AC_thisclass
{
GENERATED_BODY()
public:
AClass* VarName; //
}
Correct behavior (thisclass.h)
#include "thisclass.generated.h"
class AClass; //correct behavior
UCLASS()
class GAME_API AC_thisclass
{
GENERATED_BODY()
public:
AClass* VarName;
}
(thisclass.cpp)
#include <thisclass.h>
#include <Class.h> //correct