AGameModeBase::StartPlay not running
I make a few following steps, but my ARoomEscapeGameModeBase::StartPlay did not working
Steps:
- create new GameMode GameModeBase C++ class ( ARoomEscapeGameModeBase : public AGameModeBase )
- select in Edit>Project settings>Maps&Modes default GameMode = “ARoomEscapeGameModeBase”
- select in World settings “ARoomEscapeGameModeBase”
- Write some code
But after starting game, i see nothing in my LOG
ARoomEscapeGameModeBase.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "RoomEscapeGameModeBase.generated.h"
/**
*
*/
UCLASS()
class ROOMESCAPE_API ARoomEscapeGameModeBase : public AGameModeBase
{
GENERATED_BODY()
public:
virtual void StartPlay() override;
};
ARoomEscapeGameModeBase.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "RoomEscapeGameModeBase.h"
void ARoomEscapeGameModeBase::StartPlay() {
Super::StartPlay();
UE_LOG( LogTemp, Warning, TEXT("Initializing game in GameMode in C++") );
UE_LOG(LogTemp, Warning, TEXT("Your message"));
}
Please tell me why I do not see anything in my LOG ?
BEN, eto ,
i need help ))