RealtimeStyleTransferRuntime/Plugins/CommonGame/Source/Private/Messaging/CommonMessagingSubsystem.cpp

47 lines
1.2 KiB
C++
Raw Permalink Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "Messaging/CommonMessagingSubsystem.h"
2022-09-13 07:18:28 +00:00
#include "Containers/Array.h"
#include "Engine/GameInstance.h"
#include "Engine/LocalPlayer.h"
#include "Templates/Casts.h"
#include "UObject/Object.h"
2022-05-23 18:41:30 +00:00
#include "UObject/UObjectHash.h"
2022-09-13 07:18:28 +00:00
class FSubsystemCollectionBase;
class UClass;
2022-05-23 18:41:30 +00:00
void UCommonMessagingSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
Super::Initialize(Collection);
}
void UCommonMessagingSubsystem::Deinitialize()
{
Super::Deinitialize();
}
bool UCommonMessagingSubsystem::ShouldCreateSubsystem(UObject* Outer) const
{
if (!CastChecked<ULocalPlayer>(Outer)->GetGameInstance()->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)
{
}