Character Usage
The following scripts can be used to load and use characters
- Layered Character Loader - Load pre-existing Layered Characters.
- Layered Character Template Loader - Create/load a layered character from a template.
- Unified Character Loader - Load a Unified Character from a template.
The Character Shader
A shader is how the final character is displayed. Sprites from the Base Spritesheet in a Character Type are rendered in a component such as a Sprite Renderer or used in an Animator Controller.
If a Unified Character is used, the shader takes the single spritesheet of the character and shows that over the Base Spritesheet.
If a Layered Character is used, the shader combines all layers into the final rendered character.
Note
If a Character Loader is used the shader will be applied automatically.
Character Loaders
Character loading scripts can be used to load any character you've created regardless of the type. All Character Loaders have the following fields:
References
Field | Type | Description |
---|---|---|
Renderer | Renderer |
Reference to a Renderer component such as a Sprite Renderer. Used to apply shader. |
Set Animator Controller | Bool |
Toggle if the Animator Controller referenced in the Character Type should be applied to animate the character. |
Animator | Animator |
Reference to an Animator component to apply the animator controller. Only shown if Set Animator Controller is true. |
Loading Settings
Field | Type | Description |
---|---|---|
Loading Mode | Enum |
Option to load character asynchronously or synchronously. |
Load Character On Start | Bool |
if true the the character will be loaded when the Start method is called. |
Unified Character Loader
Requirements:
Have a Unified Character Type and at least one Unified Character Template Setup.
The Unified Character Loader component can be used to create and load a character from a Unified Character Template.
- Add the script to a game object.
- Set Renderer and optionally Animator references.
- Set Loading Settings.
- Reference the Unified Character Template you want to load.
- Play your game and if Load Character On Start is toggled, your character will be displayed.
Layered Character Loaders
Layered Character Loader
Requirements:
Have a Layered Character Type setup and at least one Layered Character saved in a group.
The Layered Character Loader component can be used to load Layered Characters from a Character Group.
- Add the script to a game object.
- Set Renderer and optionally Animator references.
- Set Loading Settings.
- Reference the Character Type you want to load a character from.
- Set the Character Group you want to load your character from within the Character Type.
Character Groups
After a Character Type has been referenced, you can choose which group you want to load a Layered Character from:
Group Type | Description |
---|---|
Primary Character Slot | A single character contained in the Character Type. No additional parameters required. |
Flexible Group | A group of characters that can be added, removed, or edited at any time. |
Fixed Group | A group with a preset number of characters. New characters cannot be added or removed after creation. |
If Flexible Group or Fixed Group is selected, the following parameters are required:
Parameter | Type | Description |
---|---|---|
Character Group Name | String |
A unique name used to find the fixed or flexible group. |
Character Load Method | Enum |
Determines how a character is selected from the group: - Character Name → Load a character by its saved name. - Character Index → Load a character by its index position in the group. - Randomized → Randomly load a character from the group. |
Layered Character Template Loader
Requirements:
Have a Layered Character Type and at least one Layered Character Template Setup.
The Layered Character Template Loader component can be used to create and load a character from a Layered Character Template.
- Add the script to a game object.
- Set Renderer and optionally Animator references.
- Set Loading Settings.
- Reference the Layered Character Template you want to load.
- Play your game and if Load Character On Start is toggled, your character will be displayed.