Agrarsense
SensorDataAsset.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"
10#include "Engine/Texture2D.h"
11#include "Internationalization/Text.h"
12#include "GameFramework/Actor.h"
13
15
16#include "SensorDataAsset.generated.h"
17
18class ASensor;
19class ASensorModel;
20
22UCLASS(Blueprintable, BlueprintType)
23class USensorDataAsset : public UPrimaryDataAsset
24{
25 GENERATED_BODY()
26
27public:
28
30 UFUNCTION(BlueprintPure)
31 FText GetShortNameWithFallback()
32 {
33 return ShortName.IsEmpty() ? Name : ShortName;
34 }
35
37 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
38 FString UniqueIdentifier;
39
41 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
42 ESensorTypes SensorType;
43
45 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
46 FText Name;
47
49 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
50 FText ShortName;
51
53 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
54 FText Description;
55
57 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
58 TSubclassOf<ASensorModel> ModelClass;
59
61 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
62 TSubclassOf<ASensor> ActorClass;
63
65 UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Sensor data")
66 TObjectPtr<UTexture2D> Icon;
67};
ESensorTypes
Definition: SensorTypes.h:15
Definition: Sensor.h:44