8#include "CoreMinimal.h"
9#include "Engine/DataAsset.h"
10#include "Engine/Texture2D.h"
13#include "ActorAssetGroupDataAsset.generated.h"
27 UPROPERTY(EditAnywhere, BlueprintReadOnly)
28 FString UniqueIdentifier;
32 UPROPERTY(EditAnywhere, BlueprintReadOnly)
33 FText VariationText = NSLOCTEXT("
Agrarsense", "Variation_Size", "Size");
38 UPROPERTY(EditAnywhere, BlueprintReadOnly)
44 UPROPERTY(EditAnywhere, BlueprintReadOnly)
45 TObjectPtr<UTexture2D> GroupTexture;
50 UPROPERTY(EditAnywhere, BlueprintReadOnly)
51 FString DefaultVariation;
56 UPROPERTY(EditAnywhere, BlueprintReadOnly)
63 UFUNCTION(BlueprintCallable, BlueprintPure)
64 bool HasMultipleVariations()
66 return Variations.Num() >= 2;
73 UFUNCTION(BlueprintCallable, BlueprintPure)
74 bool HasDefaultVariation()
76 return !DefaultVariation.IsEmpty();
84 UFUNCTION(BlueprintCallable, BlueprintPure)
87 return FindVariationByUniqueIdentifier(DefaultVariation, FoundVariation);
96 UFUNCTION(BlueprintCallable, BlueprintPure)
97 FActorAssetVariation FindVariationByUniqueIdentifier(const FString& UniqueIdentifierToFind,
bool& FoundVariation)
99 for (
const auto& Variation : Variations)
101 if (Variation.UniqueIdentifier == UniqueIdentifierToFind)
103 FoundVariation =
true;
108 FoundVariation =
false;
114 UniqueIdentifier = FGuid::NewGuid().ToString();
UActorAssetGroupDataAsset()