Modular Character Managers
The hub of the Modular Character System.
Last updated
The hub of the Modular Character System.
Last updated
Functionality for the Modular Character System is carried out by the Modular Character Manager class. This is an abstract base class which provides the infrastructure for managing Wearables, Materials, and Morphs.
There are two derived classes for this class: The Hidden Cache Manager and the Clean Manager. These scripts can not be applied to a character at the same time, and both require a Modular Character component. They share the same functions, but handle them differently
The Hidden Cache Manager instantiates Wearables as they’re equipped, but rather than destroying the Wearables when they’re removed, they are kept hidden. The system then enables and disables Wearable meshes as they’re added/removed rather than instantiating and destroying.
This is more efficient, not only because instantiating and destroying is performance intensive, but it also eliminates the need to re-weight Wearables to the armature hierarchy each time they’re equipped. This is best used when clothing will be swapped often.
When you add a Hidden Cache Manager to a Character, you will see three parameters:
Limit Custom Bones: When Wearables (such as hair) with custom bones are added to the character, the rig is updated to include those bones. Checking this option means that items with custom bones will be destroyed when removed. This keeps the rig clean and eliminates duplicate bones.
Enable Dynamic Morphs: When a Wearable is added, the System checks for the current morph values on the Character and updates the new Wearable to match. If you don't intend to update the morph values, you can check this option to bypass the checking/applying of morph values. You will want to leave this checked unless you wish to use the characters as is, with no morph customization.
Hidden Wearables: This array is automatically updated as Wearables are added to the Character. It keeps track of what has been added already and controls whether the renderers for them should be enabled or disabled.
The Clean Manager works by instantiating Wearables each time they’re added, and destroying them when they’re removed.
When you add a Clean Manager to a Character, you will see only one parameter:
Enable Dynamic Morphs: When a Wearable is added, the System checks for the current morph values on the Character and updates the new Wearable to match. If you don't intend to update the morph values, you can check this option to bypass the checking/applying of morph values. You will want to leave this checked unless you wish to use the characters as is, with no morph customization.