You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Before: 3548 unity files Total CPU Time: 47343.578125 s Total time in Parallel executor: 494.60 seconds After: 3445 unity files Total CPU Time: 46044.671875 s Total time in Parallel executor: 468.51 seconds #jira #preflight 63336159b20e73a098b7f24f [CL 22218213 by bryan sefcik in ue5-main branch]
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StateTreeReference.h"
|
|
#include "StateTree.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(StateTreeReference)
|
|
|
|
void FStateTreeReference::SyncParametersToMatchStateTree(FInstancedPropertyBag& ParametersToSync) const
|
|
{
|
|
if (StateTree == nullptr)
|
|
{
|
|
ParametersToSync.Reset();
|
|
}
|
|
else
|
|
{
|
|
ParametersToSync.MigrateToNewBagInstance(StateTree->GetDefaultParameters());
|
|
}
|
|
}
|
|
|
|
bool FStateTreeReference::RequiresParametersSync() const
|
|
{
|
|
return (StateTree == nullptr && Parameters.IsValid())
|
|
|| (StateTree != nullptr && StateTree->GetDefaultParameters().GetPropertyBagStruct() != Parameters.GetPropertyBagStruct());
|
|
}
|
|
|
|
void FStateTreeReference::ConditionallySyncParameters() const
|
|
{
|
|
if (RequiresParametersSync())
|
|
{
|
|
FStateTreeReference* NonConstThis = const_cast<FStateTreeReference*>(this);
|
|
NonConstThis->SyncParameters();
|
|
UE_LOG(LogStateTree, Warning, TEXT("Parameters for '%s' stored in StateTreeReference were auto-fixed to be usable at runtime."), *GetNameSafe(StateTree));
|
|
}
|
|
}
|
|
|