File size: 1,552 Bytes
7fd553e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Engine/DataAsset.h"
#include "LyraTeamDisplayAsset.generated.h"
struct FPropertyChangedEvent;
class UMaterialInstanceDynamic;
class UMeshComponent;
class UNiagaraComponent;
class AActor;
class UTexture;
// Represents the display information for team definitions (e.g., colors, display names, textures, etc...)
UCLASS(BlueprintType)
class ULyraTeamDisplayAsset : public UDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TMap<FName, float> ScalarParameters;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TMap<FName, FLinearColor> ColorParameters;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TMap<FName, TObjectPtr<UTexture>> TextureParameters;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FText TeamShortName;
public:
UFUNCTION(BlueprintCallable, Category=Teams)
void ApplyToMaterial(UMaterialInstanceDynamic* Material);
UFUNCTION(BlueprintCallable, Category=Teams)
void ApplyToMeshComponent(UMeshComponent* MeshComponent);
UFUNCTION(BlueprintCallable, Category=Teams)
void ApplyToNiagaraComponent(UNiagaraComponent* NiagaraComponent);
UFUNCTION(BlueprintCallable, Category=Teams, meta=(DefaultToSelf="TargetActor"))
void ApplyToActor(AActor* TargetActor, bool bIncludeChildActors = true);
public:
//~UObject interface
#if WITH_EDITOR
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#endif
//~End of UObject interface
};
|