Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "CoreMinimal.h"
- #include "Runtime/CoreUObject/Public/Templates/Casts.h"
- #include "Runtime/Engine/Classes/Materials/MaterialLayersFunctions.h"
- #include "Runtime/Engine/Classes/Materials/MaterialInterface.h"
- #include "UmgInventoryUtilitiesTypes.generated.h"
- USTRUCT(BlueprintType)
- struct FInventoryExposedMaterialParameter
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FName Name;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FName FriendlyName;
- };
- USTRUCT(BlueprintType)
- struct FMaterialVectorParameterInfoValue
- {
- GENERATED_BODY()
- public:
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
- FMaterialParameterInfo ParameterInfo;
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
- FLinearColor Value;
- };
- USTRUCT(BlueprintType)
- struct FMaterialScalarParameterInfoValue
- {
- GENERATED_BODY()
- public:
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
- FMaterialParameterInfo ParameterInfo;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- float Value;
- };
- USTRUCT(BlueprintType)
- struct FMaterialParameterInfoValueCollection
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- TArray<FMaterialScalarParameterInfoValue> MaterialScalarParameterInfoValues;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- TArray<FMaterialVectorParameterInfoValue> MaterialVectorParameterInfoValues;
- };
- USTRUCT(BlueprintType)
- struct FMaterialSettings
- {
- GENERATED_BODY()
- public:
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
- FName SlotName;
- UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
- class UMaterialInterface* Material;
- UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
- FMaterialParameterInfoValueCollection MaterialParamaterInfoValueCollection;
- };
- USTRUCT(BlueprintType)
- struct FItemMaterialInformation
- {
- GENERATED_BODY()
- public:
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
- TMap<FName, FMaterialSettings> SlotToMaterialParameterInfoValueCollection;
- };
- USTRUCT(BlueprintType)
- struct FEquippableItemBaseData
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FGuid Id;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FString Name;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FName Slot;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FName ParentSocket;
- UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
- bool bIsEquipped;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- class UTexture2D* ItemPreviewTexture;
- FEquippableItemBaseData() :
- Id(FGuid::NewGuid()),
- Name(FString("")),
- Slot(FName::FName()),
- ParentSocket(FName::FName()),
- bIsEquipped(false),
- ItemPreviewTexture(nullptr)
- {};
- };
- USTRUCT(BlueprintType)
- struct FEquippableSkeletalMeshData : public FEquippableItemBaseData
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- class USkeletalMesh* Mesh;
- FEquippableSkeletalMeshData() :
- Mesh(nullptr)
- {};
- };
- USTRUCT(BlueprintType)
- struct FEquippableActorData : public FEquippableItemBaseData
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- TSubclassOf<AActor> ActorClass;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- class UAnimSequence* EquipAdditiveAnimation;
- FEquippableActorData() :
- ActorClass(nullptr),
- EquipAdditiveAnimation(nullptr)
- {};
- };
- UCLASS(BlueprintType)
- class UMGINVENTORYUTILITIES_API UEquippableItemBase : public UObject
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FGuid Id;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FString Name;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FName Slot;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FName ParentSocket;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- bool bIsEquipped;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- class UTexture2D* ItemPreviewTexture;
- UFUNCTION(BlueprintCallable)
- void InitFromData(FEquippableItemBaseData Data)
- {
- Id = Data.Id;
- Name = Data.Name;
- Slot = Data.Slot;
- ParentSocket = Data.ParentSocket;
- bIsEquipped = Data.bIsEquipped;
- ItemPreviewTexture = Data.ItemPreviewTexture;
- };
- };
- UCLASS(BlueprintType)
- class UMGINVENTORYUTILITIES_API UEquippableSkeletalMesh : public UEquippableItemBase
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- class USkeletalMesh* Mesh;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- class USkeletalMeshComponent* MeshComponent;
- UFUNCTION(BlueprintCallable)
- void InitFromData(FEquippableSkeletalMeshData Data)
- {
- Id = Data.Id;
- Name = Data.Name;
- Slot = Data.Slot;
- ParentSocket = Data.ParentSocket;
- bIsEquipped = Data.bIsEquipped;
- ItemPreviewTexture = Data.ItemPreviewTexture;
- Mesh = Data.Mesh;
- MeshComponent = nullptr;
- };
- };
- UCLASS(BlueprintType)
- class UMGINVENTORYUTILITIES_API UEquippableActor : public UEquippableItemBase
- {
- GENERATED_BODY()
- public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- TSubclassOf<AActor> ActorClass;
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
- AActor *Actor;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- class UAnimSequence* EquipAdditiveAnimation;
- UFUNCTION(BlueprintCallable)
- void InitFromData(FEquippableActorData Data)
- {
- Id = Data.Id;
- Name = Data.Name;
- Slot = Data.Slot;
- ParentSocket = Data.ParentSocket;
- bIsEquipped = Data.bIsEquipped;
- ItemPreviewTexture = Data.ItemPreviewTexture;
- ActorClass = Data.ActorClass;
- EquipAdditiveAnimation = Data.EquipAdditiveAnimation;
- Actor = nullptr;
- };
- };
- USTRUCT(BlueprintType)
- struct FInventoryMaterialItem
- {
- GENERATED_BODY()
- public:
- FName Name;
- FName Type;
- class UTexture2D *PreviewImage;
- };
Add Comment
Please, Sign In to add comment