Difference between revisions of "Creating a customizable prefab"
From UMAWiki
(Created page with " Often, a developer will want to pregenerate a character, and place that pregenerated character into the scene. This is a simple procedure in DCS once you have the basics. Fi...") |
|||
Line 16: | Line 16: | ||
* Select "UMA/Load And Save/Save DynamicCharacterAvatar(s) Text (optimized)" from the menu, and save your character to the '''CharacterRecipes''' folder we created above. I named by character "Dwarf": | * Select "UMA/Load And Save/Save DynamicCharacterAvatar(s) Text (optimized)" from the menu, and save your character to the '''CharacterRecipes''' folder we created above. I named by character "Dwarf": | ||
− | [[File: | + | [[File:Creating a Prefab-1.jpg]] |
+ | |||
+ | * Open the "Load/Save" options on the UMADynamicCharacterAvater in the scene (the one you just modified). | ||
+ | * Set the "Load Path Type" to '''Resources'''. | ||
+ | * Set the "Load Filename" to the name of the character we saved (in this case, "Dwarf") | ||
+ | * Drag the UMADynamicCharacterAvatar into your project to create a prefab, and name it. ("I called it "Dwarf") | ||
+ | |||
+ | [[File:Creating a Prefab-2.jpg]] | ||
+ | |||
+ | * Stop the playback of the scene, and drag the new dwarf prefab into the scene in several places, positioning and rotating as needed, and press play: | ||
+ | |||
+ | [[File:Creating a Prefab-3.jpg]] |
Revision as of 18:03, 1 September 2017
Often, a developer will want to pregenerate a character, and place that pregenerated character into the scene. This is a simple procedure in DCS once you have the basics.
First step is to create a place to store your character definitions. Characters are stored as recipes. For ease of use, we will store these definitions in resources.
- Create a Resources folder if you do not already have one.
- Create a folder inside the resources folder, and give it a name. We'll name ours CharacterRecipes
Next, create and save a character.
- Start up the "UMA DCS Demo - Simple Setup", and design your character:
- Add wardrobe items
- Set colors
- Change DNA
- Select the UMADynamicCharacterAvatar in the scene Hierarchy pane
- Select "UMA/Load And Save/Save DynamicCharacterAvatar(s) Text (optimized)" from the menu, and save your character to the CharacterRecipes folder we created above. I named by character "Dwarf":
- Open the "Load/Save" options on the UMADynamicCharacterAvater in the scene (the one you just modified).
- Set the "Load Path Type" to Resources.
- Set the "Load Filename" to the name of the character we saved (in this case, "Dwarf")
- Drag the UMADynamicCharacterAvatar into your project to create a prefab, and name it. ("I called it "Dwarf")
- Stop the playback of the scene, and drag the new dwarf prefab into the scene in several places, positioning and rotating as needed, and press play: