Skip to main content

CustomizationCategory

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​

MemberWhat it is
protected CustomizationCategory()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

6 private and internal fields
MemberWhat it is
private Sprite iconIcon for the category on the selection panel.
private bool isActiveWhen off, the category is left off the selection panel and out of randomizing.
private bool isVisibleWhether the category shows in the category scroll list.
private float pickupScaleScale for cosmetic pickups of this category.
private int priorityOrder of the category on the selection panel.
private ItemCategory typeThe shop item category this maps to.

Properties​

MemberWhat 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​

MemberWhat 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: