Files
UnrealEngineUWP/Engine/Source/Developer/GameplayDebugger/Private/GameplayDebuggerAddonBase.cpp
Robert Manuszewski 2752c82adc Merging //UE4/Dev-Main @ 4664414 to Dev-Core (//UE4/Dev-Core)
#rb none

[CL 4675693 by Robert Manuszewski in Dev-Core branch]
2019-01-02 00:55:51 -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;
}