Ue4 crashes when i try to create an instance (AMonster_Spawner ms), i simply try to access TArray in the gamemode Vechten class from the Monster_Spanwer class
thanks
class MYPROJECT_API AMonster_Spawner : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMonster_Spawner();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
UPROPERTY(EditAnywhere)
TSubclassOf<AMonster_object> mesh;
TArray<AMonster_object*> AMonster_Spawner::monster_lijst;
int time;
FVector loc;
};
class MYPROJECT_API AVechten : public AGameMode
{
GENERATED_BODY()
public:
void AVechten::BeginPlay();
void AVechten::Tick(float DeltaTime);
AMonster_Spawner ms;
};