A class in Root.Township, Alta.Customization.
Prefab component for one cosmetic's look: its visual parts plus the slots it takes as primary and the slots it disables.
Constructors
| Member | What it is |
|---|
CustomizationVisual() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
Properties
| Member | What it is |
|---|
ICustomizationDefinition Definition { get; set; } | The cosmetic definition this visual belongs to. |
IEnumerable<int> DisableSlots { get; } | Slots disabled while this visual is worn. |
ICustomizationPart[] Parts { get; } | The visual's parts. |
IEnumerable<int> PrimarySlots { get; } | Slots of the primary parts plus additionalPrimary. |
Methods
| Member | What it is |
|---|
CustomizationArguments[] CreateDefaultArguments() | Fresh copies of every part's default arguments, one per part. |
void Initialize() | Gives each part its index and a link back to this visual. |
2 private and internal methods
| Member | What it is |
|---|
private bool HasCircularReference() | Editor check: whether any mesh part's copy-colour-from chain loops back to itself, which crashes painting. |
private void OnValidate() | Logs an error if there are no primary slots or there is a circular colour reference. |
Used in
Members of other types that take, return or hold a CustomizationVisual: