Customize with the Inspector
Customizing through the inspector allows for fast iterations. The characters can be found in
Assets\2D Customizable Characters\Characters
Each character has a prefab folder that contains prebuilt characters ready to be customized. It's recommended that you
don't work on the included prefabs directly but instead
create Prefab Variant. On the characters, you will be mainly
using three components for customization:
Customizable Character
API
Mainly used by the Character Editor to get references, but there are a few helpful buttons when working from the
inspector:
- Toggle Shadows: Toggles GameObjects in the Shadows collection on and off.
- Toggle Weapon Effects: Toggles weapon effects on and off. Weapon effects are references from any WeaponSlot found
in the rigs
- Toggle Preview Positions: Positions character rigs in a row. Helpful when you are customizing characters and want
to see all directions.
- Save Preset: Saves all the current Customizer and ScaleCustomizer customizations as
a CharacterPreset.
- Load Preset: Loads customizations from a CharacterPreset
.
Tip
CharacterPreset assets can also be dropped into the blue Drag and Drop box.
Customizer
This is the main component that handles applying customizations. The rigs will be the parents that will be searched
through to find any customizable component, such as BodyPart
and CustomizationSlot.
Each added customization can have, depending on
the CustomizationData, the following settings:
- Category: The CustomizationCategory. It ensures there
is only one piece of equipment for each category added. This means any customization already added in the same
category will be removed.
- Asset:> The CustomizationData asset reference.
- Main Color: The color that will be applied to the customization's sprites. It won't be available if the
CustomizationData doesn't allow tinting.
- Detail Index: The index of the customization's detail collection. It won't be available if there are no details
set in the CustomizationData.
- Detail Color: The color that will be applied to the customization's detail sprites. It won't be available if
CustomizationData doesn't allow the detail to be tinted or if
it is set to use the main color.
- Visibility: Toggles visibility on and off.
Buttons:
- Toggle Visibility: Toggles all visibility on and off.
- Refresh: Refreshes the whole component. Useful if Refresh On Validate isn't checked.
Tip
CustomizationData and CustomizationSet assets can also be dropped in to the blue Drag and Drop box.
Scale Customizer
Changes the scale of transforms. Useful for adjusting proportions to make either different styles or different kinds of
characters (such as children, monsters, etc.) You can simply drag the sliders to adjust the scale of the groups. You can
also create your own by simply adding a new group with the transforms you want to scale.
- Scale: The uniform (x, y) scale.
- Width: The width (x) scale.
- Length: The length (y) scale.
The Hip Position Adjuster Groups will ensure hips move up and down when the scale changes, such as when legs
lengthen.
Warning
Scaling any GameObjects with the Pivot suffix will interfere with the animations. Instead, it is recommended to use the game objects with the suffix Parent or Scale.
Expression Customizer
Changes expressions by setting eyes, eyebrows, and mouth customizations from
an ExpressionData asset. This is done at runtime with
the API:
SetExpression(ExpressionData data)
Saving Characters
If you want to save as a prefab, it is recommended to do so as a Prefab Variant. This will ensure that future updates to the included character Prefabs will apply to your character. Another convenient option is to save a CharacterPreset with the Customizable Character component, as mentioned above. Both options can be imported into the Character Editor from the File drop-down menu..