Compare commits
No commits in common. "01eda48d3877a598057739124bbef32c841b47be" and "49843cdecf7213cbf66c67593b7b65f1b7ec9ea2" have entirely different histories.
01eda48d38
...
49843cdecf
@ -1,57 +0,0 @@
|
|||||||
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
|
|
||||||
|
|
||||||
|
|
||||||
#include "DataAssets/OLSExperienceActionSet.h"
|
|
||||||
|
|
||||||
#if WITH_EDITOR
|
|
||||||
#include "Misc/DataValidation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "GameFeatureAction.h"
|
|
||||||
|
|
||||||
#include UE_INLINE_GENERATED_CPP_BY_NAME(OLSExperienceActionSet)
|
|
||||||
|
|
||||||
#define LOCTEXT_NAMESPACE "OLSSystem"
|
|
||||||
|
|
||||||
#if WITH_EDITOR
|
|
||||||
EDataValidationResult UOLSExperienceActionSet::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 UOLSExperienceActionSet::UpdateAssetBundleData()
|
|
||||||
{
|
|
||||||
Super::UpdateAssetBundleData();
|
|
||||||
|
|
||||||
for (UGameFeatureAction* action : Actions)
|
|
||||||
{
|
|
||||||
if (action)
|
|
||||||
{
|
|
||||||
action->AddAdditionalAssetBundleData(AssetBundleData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif // WITH_EDITORONLY_DATA
|
|
||||||
|
|
||||||
#undef LOCTEXT_NAMESPACE
|
|
@ -9,7 +9,6 @@
|
|||||||
#include "GameFeatureAction.h"
|
#include "GameFeatureAction.h"
|
||||||
#include "GameFeaturesSubsystemSettings.h"
|
#include "GameFeaturesSubsystemSettings.h"
|
||||||
#include "TimerManager.h"
|
#include "TimerManager.h"
|
||||||
#include "DataAssets/OLSExperienceActionSet.h"
|
|
||||||
#include "DataAssets/OLSExperienceDefinitionPrimaryDataAsset.h"
|
#include "DataAssets/OLSExperienceDefinitionPrimaryDataAsset.h"
|
||||||
#include "Net/UnrealNetwork.h"
|
#include "Net/UnrealNetwork.h"
|
||||||
#include "Systems/OLSAssetManager.h"
|
#include "Systems/OLSAssetManager.h"
|
||||||
@ -225,14 +224,14 @@ void UOLSExperienceManagerComponent::StartExperienceLoad()
|
|||||||
TSet<FSoftObjectPath> rawAssetList;
|
TSet<FSoftObjectPath> rawAssetList;
|
||||||
|
|
||||||
bundleAssetList.Add(CurrentExperience->GetPrimaryAssetId());
|
bundleAssetList.Add(CurrentExperience->GetPrimaryAssetId());
|
||||||
|
// @Todo implement this
|
||||||
for (const TObjectPtr<UOLSExperienceActionSet>& actionSet : CurrentExperience->ActionSets)
|
// for (const TObjectPtr<ULyraExperienceActionSet>& ActionSet : CurrentExperience->ActionSets)
|
||||||
{
|
// {
|
||||||
if (actionSet != nullptr)
|
// if (ActionSet != nullptr)
|
||||||
{
|
// {
|
||||||
bundleAssetList.Add(actionSet->GetPrimaryAssetId());
|
// BundleAssetList.Add(ActionSet->GetPrimaryAssetId());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Load assets associated with the experience
|
// Load assets associated with the experience
|
||||||
|
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "OLSPawnPrimaryDataAsset.h"
|
|
||||||
#include "OLSExperienceActionSet.generated.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Definition of a set of actions to perform as part of entering an experience
|
|
||||||
*/
|
|
||||||
UCLASS(BlueprintType, NotBlueprintable)
|
|
||||||
class OLS_API UOLSExperienceActionSet : public UOLSPawnPrimaryDataAsset
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//~ Begin UObject interface
|
|
||||||
#if WITH_EDITOR
|
|
||||||
virtual EDataValidationResult IsDataValid(class FDataValidationContext& context) const override;
|
|
||||||
#endif
|
|
||||||
//~ End UObject interface
|
|
||||||
|
|
||||||
//~ Begin UPrimaryDataAsset interface
|
|
||||||
#if WITH_EDITORONLY_DATA
|
|
||||||
virtual void UpdateAssetBundleData() override;
|
|
||||||
#endif
|
|
||||||
//~ End UPrimaryDataAsset interface
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// List of actions to perform as this experience is loaded/activated/deactivated/unloaded
|
|
||||||
UPROPERTY(EditAnywhere, Instanced, Category="Actions to Perform")
|
|
||||||
TArray<TObjectPtr<class UGameFeatureAction>> Actions;
|
|
||||||
|
|
||||||
// List of Game Feature Plugins this experience wants to have active
|
|
||||||
UPROPERTY(EditAnywhere, Category="Feature Dependencies")
|
|
||||||
TArray<FString> GameFeaturesToEnable;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
@ -42,14 +42,14 @@ public:
|
|||||||
TArray<FString> GameFeaturesToEnable;
|
TArray<FString> GameFeaturesToEnable;
|
||||||
|
|
||||||
/** The default pawn class to spawn for players */
|
/** The default pawn class to spawn for players */
|
||||||
UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition")
|
// UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition")
|
||||||
TObjectPtr<const class UOLSPawnPrimaryDataAsset> DefaultPawnData = nullptr;
|
// TObjectPtr<const ULyraPawnData> DefaultPawnData;
|
||||||
|
|
||||||
// List of actions to perform as this experience is loaded/activated/deactivated/unloaded
|
// List of actions to perform as this experience is loaded/activated/deactivated/unloaded
|
||||||
UPROPERTY(EditDefaultsOnly, Instanced, Category = "OLSExperienceDefinition")
|
UPROPERTY(EditDefaultsOnly, Instanced, Category = "OLSExperienceDefinition")
|
||||||
TArray<TObjectPtr<class UGameFeatureAction>> Actions;
|
TArray<TObjectPtr<class UGameFeatureAction>> Actions;
|
||||||
|
|
||||||
// List of additional action sets to compose into this experience
|
// List of additional action sets to compose into this experience
|
||||||
UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition")
|
// UPROPERTY(EditDefaultsOnly, Category = "OLSExperienceDefinition")
|
||||||
TArray<TObjectPtr<class UOLSExperienceActionSet>> ActionSets;
|
// TArray<TObjectPtr<class ULyraExperienceActionSet>> ActionSets;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user