#pragma once #include "CoreMinimal.h" #include "NakedDesire/Clothing/ClothingItemInstance.h" #include "NakedDesire/Clothing/ClothingItem.h" #include "ItemSaveRecord.generated.h" class UClothingItemInstance; USTRUCT() struct NAKEDDESIRE_API FItemSaveRecord { GENERATED_BODY() UPROPERTY(SaveGame) FGuid InstanceId; UPROPERTY(SaveGame) TSoftObjectPtr Definition; UPROPERTY(SaveGame) float Condition = 1.0f; UPROPERTY(SaveGame) FGuid ParentId; UPROPERTY(SaveGame) FTransform WorldTransform; void Init(const UClothingItemInstance* ClothingItemInstance); }; inline void FItemSaveRecord::Init(const UClothingItemInstance* ClothingItemInstance) { InstanceId = ClothingItemInstance->GetInstanceId(); Definition = ClothingItemInstance->GetClothingItem(); Condition = ClothingItemInstance->Condition; }