Download LyraStarterGame/Source/LyraGame/Inventory/IPickupable.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 1.94 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Inventory/IPickupable.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/Inventory/IPickupable.h
-
curl -L -o IPickupable.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Inventory/IPickupable.h
1.94 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| template <typename InterfaceType> class TScriptInterface; | |
| class AActor; | |
| class ULyraInventoryItemDefinition; | |
| class ULyraInventoryItemInstance; | |
| class ULyraInventoryManagerComponent; | |
| class UObject; | |
| struct FFrame; | |
| USTRUCT(BlueprintType) | |
| struct FPickupTemplate | |
| { | |
| GENERATED_BODY() | |
| public: | |
| UPROPERTY(EditAnywhere) | |
| int32 StackCount = 1; | |
| UPROPERTY(EditAnywhere) | |
| TSubclassOf<ULyraInventoryItemDefinition> ItemDef; | |
| }; | |
| USTRUCT(BlueprintType) | |
| struct FPickupInstance | |
| { | |
| GENERATED_BODY() | |
| public: | |
| UPROPERTY(EditAnywhere, BlueprintReadOnly) | |
| TObjectPtr<ULyraInventoryItemInstance> Item = nullptr; | |
| }; | |
| USTRUCT(BlueprintType) | |
| struct FInventoryPickup | |
| { | |
| GENERATED_BODY() | |
| public: | |
| UPROPERTY(EditAnywhere, BlueprintReadOnly) | |
| TArray<FPickupInstance> Instances; | |
| UPROPERTY(EditAnywhere, BlueprintReadOnly) | |
| TArray<FPickupTemplate> Templates; | |
| }; | |
| /** */ | |
| UINTERFACE(MinimalAPI, BlueprintType, meta = (CannotImplementInterfaceInBlueprint)) | |
| class UPickupable : public UInterface | |
| { | |
| GENERATED_BODY() | |
| }; | |
| /** */ | |
| class IPickupable | |
| { | |
| GENERATED_BODY() | |
| public: | |
| UFUNCTION(BlueprintCallable) | |
| virtual FInventoryPickup GetPickupInventory() const = 0; | |
| }; | |
| /** */ | |
| UCLASS() | |
| class UPickupableStatics : public UBlueprintFunctionLibrary | |
| { | |
| GENERATED_BODY() | |
| public: | |
| UPickupableStatics(); | |
| public: | |
| UFUNCTION(BlueprintPure) | |
| static TScriptInterface<IPickupable> GetFirstPickupableFromActor(AActor* Actor); | |
| UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, meta = (WorldContext = "Ability")) | |
| static void AddPickupToInventory(ULyraInventoryManagerComponent* InventoryComponent, TScriptInterface<IPickupable> Pickup); | |
| }; | |