Files
UnrealEngineUWP/Engine/Source/Developer/GameplayDebugger/Private/GameplayDebuggerAddonBase.cpp
Ryan Vance 7c51ff94af Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR)
CL 1 of 8
#rb integration

[CL 4748712 by Ryan Vance in Dev-VR branch]
2019-01-17 18:54:05 -05:00

43 lines
1.1 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "GameplayDebuggerAddonBase.h"
#include "GameplayDebuggerCategoryReplicator.h"
#if WITH_EDITOR
#include "Editor/EditorEngine.h"
#endif
AActor* FGameplayDebuggerAddonBase::FindLocalDebugActor() const
{
AGameplayDebuggerCategoryReplicator* RepOwnerOb = RepOwner.Get();
return RepOwnerOb ? RepOwnerOb->GetDebugActor() : nullptr;
}
AGameplayDebuggerCategoryReplicator* FGameplayDebuggerAddonBase::GetReplicator() const
{
return RepOwner.Get();
}
FString FGameplayDebuggerAddonBase::GetInputHandlerDescription(int32 HandlerId) const
{
return InputHandlers.IsValidIndex(HandlerId) ? InputHandlers[HandlerId].ToString() : FString();
}
void FGameplayDebuggerAddonBase::OnGameplayDebuggerActivated()
{
// empty in base class
}
void FGameplayDebuggerAddonBase::OnGameplayDebuggerDeactivated()
{
// empty in base class
}
bool FGameplayDebuggerAddonBase::IsSimulateInEditor()
{
#if WITH_EDITOR
extern UNREALED_API UEditorEngine* GEditor;
return GIsEditor && (GEditor->bIsSimulateInEditorQueued || GEditor->bIsSimulatingInEditor);
#endif
return false;
}