Files
UnrealEngineUWP/Engine/Source/Developer/GameplayDebugger/Private/GameplayDebuggerAddonBase.cpp
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

43 lines
1.1 KiB
C++

// Copyright 1998-2017 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;
}