An abstract class in Root.Township, Alta.Customization.
Asset for one cosmetic category (hair, hats and so on) in the character customizer: its database item category, ordering, icon and how random picks are made.
Constructors
| Member | What it is |
|---|
protected CustomizationCategory() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private Sprite icon | Icon for the category on the selection panel. |
private bool isActive | When off, the category is left off the selection panel and out of randomizing. |
private bool isVisible | Whether the category shows in the category scroll list. |
private float pickupScale | Scale for cosmetic pickups of this category. |
private int priority | Order of the category on the selection panel. |
private ItemCategory type | The shop item category this maps to. |
Properties
| Member | What it is |
|---|
Sprite Icon { get; } | Icon for the category on the selection panel. |
bool IsActive { get; } | If false, the category is left out of the selection panel and of randomizing. |
bool IsVisible { get; } | Whether the category is shown. True by default. |
string Name { get; } | The asset's name. |
float PickupScale { get; } | Scale applied to a cosmetic of this category when shown as a pickup. |
int Priority { get; } | Sort order on the selection panel. |
ItemCategory Type { get; } | The item category this maps to in the Alta API data. |
Methods
| Member | What it is |
|---|
abstract uint GetRandom(ICollection<uint> items, bool canUseNonOwnedItems) | Subclass: picks a random item from a set of item hashes (optionally only owned ones) or definitions. |
abstract ICustomizationDefinition GetRandom(ICollection<ICustomizationDefinition> items) | Subclass: picks a random item from a set of item hashes (optionally only owned ones) or definitions. |
void SetPickupScale(float scale) | Changes the pickup scale. |
Used in
Members of other types that take, return or hold a CustomizationCategory: