PlayerCustomizationHandler
A class in Root.Township, Alta.Customization.
Links a player's character model to the customization system: finds bones by name, holds the armour and equipment managers and switches first person. A component on the player character.
Constructors
| Member | What it is |
|---|
PlayerCustomizationHandler() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
Properties
| Member | What it is |
|---|
PlayerArmorManager ArmorManager { get; } | The player's armour manager. |
Bounds CharacterBounds { get; } | Bounds of the character body, from the inspector size. |
CharacterDummy CharacterDummy { get; } | The character model this handler drives. |
EditableEquipmentManager EditableEquipmentManager { get; } | The editable equipment manager. |
bool HasManager { get; private set; } | Whether a customization manager is set. |
bool IsDestroyed { get; private set; } | Set by Destroy. |
bool IsFirstPerson { get; } | Whether the model is in first person mode. |
PlayerCharacterCustomizationManager Manager { get; private set; } | The customization manager applying cosmetics to this character. |
string Name { get; private set; } | The game object's name, stored on Start. |
Transform RootBone { get; } | The model's root bone. |
Events
Methods
| Member | What it is |
|---|
void Destroy() | Marks the handler destroyed and detaches it from its manager. |
Transform GetBone(Transform oldBone, bool isLoggingUnfoundBones) | Finds this character's bone with the same name (or entity original name) as another rig's bone. Can log misses. |
void SetFirstPerson(bool isFirstPerson) | Switches first person mode and tells the manager. |
void SetManager(PlayerCharacterCustomizationManager manager) | Sets the customization manager and raises onManagerUpdated. |
4 private and internal methods
| Member | What it is |
|---|
private void AddToMap(Transform transform) | Adds a transform and all its children to childMap by name, keeping the first of any duplicate name. |
private void OnDrawGizmosSelected() | Empty. |
private void PrepareChildMap() | Builds childMap from the root bone the first time a bone is looked up. |
private void Start() | Caches the object's name in Name. |
Used in
Members of other types that take, return or hold a PlayerCustomizationHandler:
PlayerCharacter.customizationHandler, PlayerCharacter.CustomizationHandler, CosmeticCustomizationManager.customizationHandler, CosmeticCustomizationManager.CustomizationHandler, CosmeticPresetApplier.handler, CosmeticPresetsManager.baseHandler, CosmeticPresetsManager.handlerPrefab, CosmeticPresetTrophy.handler, EquipmentCustomizationRoom.customizationHandler, PlayerCharacterCustomizationManager.Attach, PlayerCharacterCustomizationManager.Detach, PlayerCharacterCustomizationManager.UpdateFirstPerson, ShopInterface.customizationHandler, PlayerLikeSpectralGhost.handler, LocalPlayerAdvertisingTrophy.handler, ModellingCharacter.handler, PaintBrush.handler.