#include "ClothingItemInstance.h" #include "ClothingItemDefinition.h" #include "StructUtils/InstancedStruct.h" void UClothingItemInstance::Init(UClothingItemDefinition* InClothingItem) { ItemDefinition = InClothingItem; } void UClothingItemInstance::CaptureState(FInstancedStruct& OutState) const { FClothingInstanceState ClothingState; ClothingState.Condition = Condition; OutState.InitializeAs(ClothingState); } void UClothingItemInstance::ApplyState(const FInstancedStruct& InState) { if (const FClothingInstanceState* ClothingState = InState.GetPtr()) { Condition = ClothingState->Condition; } }