RealtimeStyleTransferRuntime/Source/LyraGame/Player/LyraDebugCameraController.cpp

23 lines
743 B
C++
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "LyraDebugCameraController.h"
#include "LyraCheatManager.h"
ALyraDebugCameraController::ALyraDebugCameraController(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
// Use the same cheat class as LyraPlayerController to allow toggling the debug camera through cheats.
CheatClass = ULyraCheatManager::StaticClass();
}
void ALyraDebugCameraController::AddCheats(bool bForce)
{
// Mirrors LyraPlayerController's AddCheats() to avoid the player becoming stuck in the debug camera.
#if USING_CHEAT_MANAGER
Super::AddCheats(true);
#else //#if USING_CHEAT_MANAGER
Super::AddCheats(bForce);
#endif // #else //#if USING_CHEAT_MANAGER
}