File size: 1,307 Bytes
4331f83 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | // Copyright Epic Games, Inc. All Rights Reserved.
#include "Messaging/CommonMessagingSubsystem.h"
#include "Engine/GameInstance.h"
#include "Engine/LocalPlayer.h"
#include "UObject/UObjectHash.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(CommonMessagingSubsystem)
class FSubsystemCollectionBase;
class UClass;
void UCommonMessagingSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
Super::Initialize(Collection);
}
void UCommonMessagingSubsystem::Deinitialize()
{
Super::Deinitialize();
}
bool UCommonMessagingSubsystem::ShouldCreateSubsystem(UObject* Outer) const
{
UGameInstance* GameInstance = CastChecked<ULocalPlayer>(Outer)->GetGameInstance();
if (GameInstance && !GameInstance->IsDedicatedServerInstance())
{
TArray<UClass*> ChildClasses;
GetDerivedClasses(GetClass(), ChildClasses, false);
// Only create an instance if there is no override implementation defined elsewhere
return ChildClasses.Num() == 0;
}
return false;
}
void UCommonMessagingSubsystem::ShowConfirmation(UCommonGameDialogDescriptor* DialogDescriptor, FCommonMessagingResultDelegate ResultCallback)
{
}
void UCommonMessagingSubsystem::ShowError(UCommonGameDialogDescriptor* DialogDescriptor, FCommonMessagingResultDelegate ResultCallback)
{
}
|