GameplayTagStack
게임플레이 태그와 카운트로 이루어져 있다.
스탯, 수량 등 여러가지 활용 가능
AddStack으로 Tag에 Count를 특정 값만큼 추가
GamePlayTagStackContainer은 InventoryItemInstance에서 들고 있다.
InventoryFragment_SetStats
InventoryList::AddEntry에서 InventoryItemInstance를 만들 때 인스턴스의 Fragment들에 대하여
OnInstanceCreated를 실행한다. ItemDefinition은 정의고, 그것을 이용해서 만든 Instance로 각종 세팅이 가능하다.
OnInstanceCreated에서 StatTagStack을 추가한다. (Map<태그,값>)
AbilityCost
클래스 지정자로 DefaultToInstanced, EditInlineNew를 써 에디터상에서 인스턴스를 바로 추가한다.
AbilityCost_ItemTagStack은 Quantity(비용), Tag, Failure Tag로 구성.
ItemDef가 ItemInstance를 만들고 ItemInstance가 EquipmentInstance를 만들고 EquipmentInstance가 Ability를 만든다.
GameplayAbility_FromEquipment가 이 과정에서 EquipmentInstance, ItemInstance를 쉽게 가져올 수 있도록 한다.
CheckCost에서 비용을 체크하고 어빌리티를 실행 가능한지 체크한다.
가능하다면 ApplyCost에서 비용만큼 소모시킨다.
AbilityCost는 UObject인데 GameplayAbility에 정의한다.
GameplayAbilty 내부에 CheckCost,ApplyCost를 만들어 비용 체크하고 계산한다.
'Unreal' 카테고리의 다른 글
| [Unreal] Lyra 프로젝트 분석 - 12. GameplayEffect (0) | 2025.02.11 |
|---|---|
| [Unreal] Lyra 프로젝트 분석 - 11. Common UI (0) | 2025.02.10 |
| [Unreal] Lyra 프로젝트 분석 - 10. GamePlayCue (0) | 2025.02.09 |
| [Unreal] Lyra 프로젝트 분석 - 09. Ability System (0) | 2025.02.09 |
| [Unreal] Lyra 프로젝트 분석 - 08. Weapon System (0) | 2025.02.09 |