2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#include "LyraTeamPublicInfo.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
|
|
|
|
#include "Containers/Array.h"
|
|
|
|
#include "Misc/AssertionMacros.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "Net/UnrealNetwork.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "UObject/CoreNetTypes.h"
|
|
|
|
|
|
|
|
class FLifetimeProperty;
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
ALyraTeamPublicInfo::ALyraTeamPublicInfo(const FObjectInitializer& ObjectInitializer)
|
|
|
|
: Super(ObjectInitializer)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ALyraTeamPublicInfo::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
|
|
|
|
{
|
|
|
|
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
|
|
|
|
|
|
|
|
DOREPLIFETIME_CONDITION(ThisClass, TeamDisplayAsset, COND_InitialOnly);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ALyraTeamPublicInfo::SetTeamDisplayAsset(TObjectPtr<ULyraTeamDisplayAsset> NewDisplayAsset)
|
|
|
|
{
|
|
|
|
check(HasAuthority());
|
|
|
|
check(TeamDisplayAsset == nullptr);
|
|
|
|
|
|
|
|
TeamDisplayAsset = NewDisplayAsset;
|
|
|
|
|
|
|
|
TryRegisterWithTeamSubsystem();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ALyraTeamPublicInfo::OnRep_TeamDisplayAsset()
|
|
|
|
{
|
|
|
|
TryRegisterWithTeamSubsystem();
|
|
|
|
}
|