61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "LyraExperienceActionSet.h"
|
|
#include "GameFeatureAction.h"
|
|
|
|
#if WITH_EDITOR
|
|
#include "Misc/DataValidation.h"
|
|
#endif
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(LyraExperienceActionSet)
|
|
|
|
#define LOCTEXT_NAMESPACE "LyraSystem"
|
|
|
|
ULyraExperienceActionSet::ULyraExperienceActionSet()
|
|
{
|
|
}
|
|
|
|
#if WITH_EDITOR
|
|
EDataValidationResult ULyraExperienceActionSet::IsDataValid(FDataValidationContext& Context) const
|
|
{
|
|
EDataValidationResult Result = CombineDataValidationResults(Super::IsDataValid(Context), EDataValidationResult::Valid);
|
|
|
|
int32 EntryIndex = 0;
|
|
for (const UGameFeatureAction* Action : Actions)
|
|
{
|
|
if (Action)
|
|
{
|
|
EDataValidationResult ChildResult = Action->IsDataValid(Context);
|
|
Result = CombineDataValidationResults(Result, ChildResult);
|
|
}
|
|
else
|
|
{
|
|
Result = EDataValidationResult::Invalid;
|
|
Context.AddError(FText::Format(LOCTEXT("ActionEntryIsNull", "Null entry at index {0} in Actions"), FText::AsNumber(EntryIndex)));
|
|
}
|
|
|
|
++EntryIndex;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
#endif
|
|
|
|
#if WITH_EDITORONLY_DATA
|
|
void ULyraExperienceActionSet::UpdateAssetBundleData()
|
|
{
|
|
Super::UpdateAssetBundleData();
|
|
|
|
for (UGameFeatureAction* Action : Actions)
|
|
{
|
|
if (Action)
|
|
{
|
|
Action->AddAdditionalAssetBundleData(AssetBundleData);
|
|
}
|
|
}
|
|
}
|
|
#endif // WITH_EDITORONLY_DATA
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|