Modular Character System
  • Overview
  • Setup
  • Demo Scenes
  • System Overview
    • Modular Character
    • Wearable
    • Wearable Set
      • Character Preset
      • Wearable Set Data
    • Wearable Database
    • Character Style
    • Cosmetic Styles
      • Skin Style
      • Eye Style
    • Character Morphs
  • Troubleshooting
  • Asset Updates
  • Reference
    • Scripting Guide
      • Modular Character Manager Functions
        • Wearables
          • EquipWearable
          • RemoveWearable
        • Wearable Sets
          • EquipWearableSet
          • EquipWearablePreset
          • RevertSetToDefaults
          • GenerateRandomSetFromDatabase
        • Materials
          • SetWearableMaterial
          • SetWearableMaterialArray
          • SetEyeStyle
          • SetSkinStyle
          • SetBodyMaterial
          • SetFaceMaterial
          • SetEyeMaterial
        • Character Morphs
          • SetBlendshapeOnAllMeshes
          • UpdateSetMorphValues
          • ApplySetMorphValuesToCurrentSet
          • ApplyCurrentMorphValuesToNew...
        • Face Merging
          • MergeFace
          • UnmergeFace
          • DestroyMergedFace
        • Saving and Loading
          • SaveCharacterPrefab
          • SaveCharacterPreset
          • SaveDataAsJSON
          • LoadCharacterFromJSON
      • Character Style Functions
        • GetAllWearablesOfCategory
        • GetAllNonDefaultWearablesOfCategory
        • GetWearableByName
        • CheckIfDefaultItem
      • Hidden Wearable Manager Functions
        • SetSlotStatusFromManagerType
        • AddWearableSlotToHiddenList
        • CheckHiddenListForWearable
  • Changelog
  • EXTERNAL LINKS
    • Stellar Game Assets Website
    • Join me on Discord
Powered by GitBook
On this page

Demo Scenes

Start creating characters with the fully functional demo scenes.

PreviousSetupNextSystem Overview

Last updated 2 months ago

Run the Demo Scene

The included demo scenes are meant to help you create premade characters and to learn how to integrate the vast functionality into your own project. They feature a lot of carefully crafted code which can be referenced or incorporated into your own systems.

The Complete demo scene is meant to mimic an in-game character creation menu. You can use this scene to add and remove Wearables, swap Materials, adjust Morphs, change cosmetics, and export prefabs, sets or data.

T

The scene has a fully functioning interface to add and remove Wearables, swap Materials, adjust Morphs, change cosmetics, and export prefabs, sets or data.

The Managers

The demo allows you to choose how you want your character to function. You can use one of three Managers:

  • Destructive The Destructive manager type instantiates each time they’re added, and destroys them when they’re removed. This manager is best used when you are creating a one-off character prefab which will remain as-is, with little to no changes.

  • Non-Destructive The Destructive manager type instantiates each time they’re added, but rather than destroying the them 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 Wearables will be swapped often.

  • Selective This is a combination of both manager types. With the selective manager, you will be able to toggle which slots you want to hide instead of destroy, while leaving the rest to function as the Destructive manager does.

The Scenes

Loading A Character

Now run the scene. Upon entering Play Mode, you will be greeted by a start window, and then a few options to set your Character Manager up to your liking.

Give your character a name and then select the type of Manager you wish to use. Finally, select the character style you wish to load from the dropdown menu and click "Submit". An unclothed prefab of that character will be loaded.

The Apparel Panel

Selecting a category from the side menu will open a menu for a corresponding slot in the Manager, and clicking on a Wearable icon will load that piece onto your character.

The Appearance Panel

The Appearance Panel has a lot going on. This is where you'll find the menu selections that adjust a characters physical appearance, like skins, makeup, facial hair, eyebrows, hairstyles and morphs.

The Attachment Panel

The Attachment Panel is similar to the Apparel Panel, but holds options for character attachments rather than clothing.

The Scene Menu

The Scene Menu may look small, but it holds a lot of options you might want to use. Here is where you can generate a random character, save your current character as a prefab, preset or as data, rename your character, reset the scene, or exit completely. Let's talk about each one of these menu items in more detail.

Randomize Button

The Randomize button does exactly what it says: Generates a random character for you. It will use the Wearable Database associated with the Character Style you've loaded. You can choose which slots to randomize, whether you want skin, makeup, and eye colors randomized as well, and whether you want it to also randomize the character body/face morphs. Here's what the window looks like that opens:

Save Button

There are several different ways you can save your current character. There is a default save location for these files, but you can specify your own in the Modular Character Manager component of whatever character you're using. To change the location for all characters you will generate, change these fields on the Style Prefab and apply the changes. Leave them blank to use the default locations.

Once you're happy with save locations, there are several different ways you can save your characters.

  • Save Prefab: Save a copy of the current character as a prefab to the "Save Location (Prefab)".

  • Save Preset: Saves the current configuration as a Character Preset to the "Save Location (Presets)".

  • Save Data to JSON File: Saves the current configuration as a JSON file to the "Save Location (Data)" This is used for runtime saving and loading. In the demo scene, this save file will now occupy a slot in the window. It will now show up every time you run the scene and you can load it by clicking the Load Button.

The Save and Load window will look different if you're running it in the Editor. That's because you can not save a Prefab or a Preset in a build. Instead, an image file will be displayed. You can change this image file in the hierarchy here:

The Reset Button

The Reset Button allows you to completely reset the scene without exiting. It will destroy your current character and take you back to the setup menu.

The Exit Button

The Exit Button closes the scene and exist play mode. No window will open to warn you that you are closing, so be sure you want to do this!

The Character Name

If you click on the character's name, it will open a field you can use to edit it. Use this to change the name of the character.

The Scene Controls

The Scene Controls in the bottom right corner allow you to get a better look at your character by zooming and rotating it.

There are two Demo Scenes that demonstrate standalone helper tools.

Generate Random Character

This Helper scene shows how to use the Modular Character Manager to randomly generate a character. You can specify which styles to generate from by adding them to the array in the "Create Random Character" component, contained on the "Random Character Generator" object in the scene hierarchy.

In the component, you can also specify the manager type you want to use, what you want to be randomized, and whether to make sure mandatory clothing is included (so you don't end up with half-dressed characters).

Press play and the scene will run, allowing you to click a button to randomly generate a character. You can give your character a name in the text field and save it to a prefab, or start over. Keep in mind that the system is not very fashionably savvy. You could end up with some interesting clothing choices! But that's all part of the fun.

Equip Character Preset

Your character, or Character Style prefab will be automatically populated when you enter play mode. By clicking the Load Presets button, the Character Presets you've added to the Character Preset array will be populated as buttons. You can click on these buttons to equip the Character Preset.

The script will check to make sure the Character Preset is compatible with the Character Style you're using. If not, a button for that preset will not be generated.

Before you start, make sure you've imported all of your Base Packs and AddOn Packs, and linked the to the (see ).

Before you run a scene, add the you want to use to the Modular Demo Interface gameobject in the Hierarchy. The component on this object contains a field to assign an array of Character Styles, called "Available Character Styles". These are the ones you will be using in the scene, so add each Character Style you want to use.

The Apparel Panel contains an interface that allows you to add Wearables to your character. You can also remove Wearables and change their Materials. This data is pulled from the assigned to the loaded .

The Equip Character Preset scene shows how to use the Modular Character Manager to add an entire to a character prefab that you previously saved as a Character Preset. You can use the Demo Scene to save Presets if you wish, or create them manually. You can use either a saved prefab of a character you've already created, or generate a new prefab by just specifying the Character Style you want to apply the Character Preset to. You then must add all of the Character Presets to the array in the "Equip Character Preset" component, contained on the "Equip Preset Menu" object in the scene hierarchy.

Wearable Databases
Character Styles
Setup
Wearable Database(s)
Character Style
Wearable Set
Wearables
Wearables
The Managers
The Scenes
Loading a Character
The Apparel Panel
The Appearance Panel
The Attachment Panel
Scene Controls
Generate Random Character
Equip Character Preset
Character Styles
The Scene view at start.
The Apparel Panel controls
The Hair Cosmetic menu
The Character Menu controls
The scene menu options.
The Style Prefab can be updated to affect all new characters.
The save locations can be changed
The Save Window in the Editor
The Save Window in a Build
Zoom or rotate