PlayerEquipmentDefinition
A class in Root.Township, Alta.Customization.
Definition asset for a wearable piece of equipment: its pickup, visual, category and armour slot. Seems left over from the removed equipment system; Hash is always 0 and UISelectionBoardScale throws.
Constructors
| Member | What it is |
|---|
PlayerEquipmentDefinition() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
6 private and internal fields
Properties
| Member | What it is |
|---|
ArmorDefinition ArmorDefinition { get; } | Armour stats for this equipment. |
EquipmentSlot ArmorSlot { get; } | Which equipment slot it goes in. |
ICustomizationCategory Category { get; set; } | Customization category. Can only be set in the editor. |
uint Hash { get; } | Always 0, hiding the asset hash. |
string Name { get; } | The asset's name. |
CosmeticPickupType PickupType { get; } | The cosmetic pickup type. |
float UISelectionBoardScale { get; } | Not implemented. Always throws NotImplementedException. |
Methods
| Member | What it is |
|---|
CustomizationArguments[] CreateDefaultArguments() | Default customization arguments from the visual prefab. |
ICustomizationVisual GetVisual() | Initializes and returns the visual prefab for this definition. Not a new copy. |
void Release() | Does nothing. |
CustomizationPickup SpawnPickup(CustomizationArguments[] arguments, Transform parent) | Spawns the customization pickup under a parent with the given arguments. |
override string ToString() | Type, category and name as text. |