Download LyraStarterGame/Source/LyraGame/Inventory/LyraInventoryItemDefinition.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 1.74 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Inventory/LyraInventoryItemDefinition.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/Inventory/LyraInventoryItemDefinition.h
-
curl -L -o LyraInventoryItemDefinition.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Inventory/LyraInventoryItemDefinition.h
1.74 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| template <typename T> class TSubclassOf; | |
| class ULyraInventoryItemInstance; | |
| struct FFrame; | |
| ////////////////////////////////////////////////////////////////////// | |
| // Represents a fragment of an item definition | |
| UCLASS(MinimalAPI, DefaultToInstanced, EditInlineNew, Abstract) | |
| class ULyraInventoryItemFragment : public UObject | |
| { | |
| GENERATED_BODY() | |
| public: | |
| virtual void OnInstanceCreated(ULyraInventoryItemInstance* Instance) const {} | |
| }; | |
| ////////////////////////////////////////////////////////////////////// | |
| /** | |
| * ULyraInventoryItemDefinition | |
| */ | |
| UCLASS(Blueprintable, Const, Abstract) | |
| class ULyraInventoryItemDefinition : public UObject | |
| { | |
| GENERATED_BODY() | |
| public: | |
| ULyraInventoryItemDefinition(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); | |
| UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=Display) | |
| FText DisplayName; | |
| UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=Display, Instanced) | |
| TArray<TObjectPtr<ULyraInventoryItemFragment>> Fragments; | |
| public: | |
| const ULyraInventoryItemFragment* FindFragmentByClass(TSubclassOf<ULyraInventoryItemFragment> FragmentClass) const; | |
| }; | |
| //@TODO: Make into a subsystem instead? | |
| UCLASS() | |
| class ULyraInventoryFunctionLibrary : public UBlueprintFunctionLibrary | |
| { | |
| GENERATED_BODY() | |
| UFUNCTION(BlueprintCallable, meta=(DeterminesOutputType=FragmentClass)) | |
| static const ULyraInventoryItemFragment* FindItemDefinitionFragment(TSubclassOf<ULyraInventoryItemDefinition> ItemDef, TSubclassOf<ULyraInventoryItemFragment> FragmentClass); | |
| }; | |