Agrarsense
ActorAssetGroupCollectionDataAsset.h
Go to the documentation of this file.
1// Copyright (c) 2023 FrostBit Software Lab at the Lapland University of Applied Sciences
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once
7
8#include "CoreMinimal.h"
9#include "Engine/DataAsset.h"
11#include "ActorAssetGroupCollectionDataAsset.generated.h"
12
13/*
14 * Collection to hold ActorAssetGroupDataAssets
15 */
16UCLASS(BlueprintType)
17class UActorAssetGroupCollectionDataAsset : public UDataAsset
18{
19 GENERATED_BODY()
20
21public:
25 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Asset Groups")
26 TArray<UActorAssetGroupDataAsset*> AssetGroups;
27
34 UActorAssetGroupDataAsset* FindByUniqueIdentifier(const FString& UniqueIdentifier, bool& Found)
35 {
36 for (const auto& GroupAsset : AssetGroups)
37 {
38 if (GroupAsset->UniqueIdentifier == UniqueIdentifier)
39 {
40 Found = true;
41 return GroupAsset;
42 }
43 }
44
45 Found = false;
46
47 return nullptr;
48 }
49};