Class NPCItemHolding
Wraps the generic item holding action for an NPC. Use to equip or unequip any equippable item.
public sealed class NPCItemHolding
- Inheritance
-
NPCItemHolding
- Inherited Members
- Extension Methods
Remarks
Requires the item holding component to be configured on the prefab via EnsureItemHolding(string?). The equippable asset path is set during prefab configuration. If the component is not present, Begin() and End() are no-ops.
Properties
IsActive
Whether the item holding action is currently active (item equipped).
public bool IsActive { get; }
Property Value
Methods
Begin()
Begins holding the configured item: equips the item specified in the prefab configuration.
public void Begin()
Remarks
No-op if the item holding component is not on the prefab. Call EnsureItemHolding(string?) during ConfigurePrefab to add it.
End()
Ends holding the item: unequips and clears the held item.
public void End()