LocalPlayerAdvertisingTrophy
A class in Root.Township, the global namespace.
Dresses a character dummy in a base body plus a set of advertised cosmetics, loaded through its own customization manager. Also runs in edit mode.
- Listed in Global namespace: I to L
- Inherits or implements
MonoBehaviour,IBuildRendererBakeable,IBuildBakeable - Attributes
ExecuteInEditMode
Constructors
| Member | What it is |
|---|---|
LocalPlayerAdvertisingTrophy() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private List<CosmeticDefinitionSku> advertised | Cosmetics being shown off. |
private bool bakeBtn | Editor button for BakeModelDebug. |
private List<CosmeticDefinitionSku> baseBody | Base body cosmetics put on first. |
private PlayerCustomizationHandler handler | Customization handler for the character dummy. |
private PlayerCharacterCustomizationManager localManager | Customization manager used for the dummy only. |
private AddressableSession session | Addressable session used to load the cosmetics. |
Properties
| Member | What it is |
|---|---|
int SortingOrder { get; } | Build bake order. Never set, so 0. |
Methods
9 private and internal methods
| Member | What it is |
|---|---|
private void AndroidLodFix() | In the editor on Android only: drops the first LOD level when it has no skinned meshes and there are more than 3 levels. |
private async Task ApplyPlayerCosmetics() | Copies the local player's own cosmetics onto the dummy. Not called in this file. |
private bool AreSameTypes<T>(T[] a, T[] b) | True when two arrays have the same length and matching element types. |
private void EndSession() | Unpauses the dummy's cosmetic packer and stops the cosmetics session. |
private async Task EnsureMinimumArgumentsPresent(IEnumerable<CosmeticDefinitionSku> list) | Replaces each item's customization arguments with defaults when their types don't match the cosmetic. |
private async Task EnsureSessionStarted() | Creates the customization manager and addressable session if needed, attaches the dummy and clears its cosmetics. |
private void OnDrawGizmos() | Editor: names each listed item after its cosmetic, or Empty. |
private void ResetDummy() | Pauses and cleans the dummy's cosmetic packer and detaches it from its manager. |
private void Start() | Runs the Android LOD fix and builds the model. |
Used in
Members of other types that take, return or hold a LocalPlayerAdvertisingTrophy: