UMA Wiki

Unity Multipurpose Avatar

User Tools

Site Tools


knowledgebase:creating_a_customizable_prefab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
knowledgebase:creating_a_customizable_prefab [2019/01/17 23:44]
jaimi created
knowledgebase:creating_a_customizable_prefab [2019/01/18 16:53] (current)
jaimi [View your handiwork!]
Line 1: Line 1:
 +====== Creating a customizable prefab ======
  
 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. 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.
-Please note that this creates a customizable UMA that is ''​generated ​on the fly''​. If you want a compact, unmodifiable prefab that is pregenerated,​ you'll need to use the power tools.+Please note that this creates a customizable UMA that is generated ​at runtime. If you want a compact, unmodifiable prefab that is pregenerated,​ you'll need to use the power tools.
  
  
-== Create save location == +==== Create save location ====
-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'''​+
  
-== Create and save the character == +First step is to create a place to store your character ​definitionsCharacters are stored as recipesFor ease of use, we will store these definitions ​in resources
- +
-* 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 aboveIn this example, I named the character "​Dwarf":​ +
- +
-[[File:​Creating a Prefab-1.jpg]] +
- +
-== Create the prefab itself == +
- +
-* 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+
  
 +  * 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**
  
-[[File:​Creating a Prefab-2.jpg]]+==== Create and save the 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 aboveIn this example, I named the character "​Dwarf":​
  
 +{{:​prefab1.png?​nolink|}}
 +==== Create the prefab itself ====
 +----
 +  * STOP playback of the scene. The prefab must be created while not in playback mode.
 +  * Open the "​Load/​Save"​ options on the UMADynamicCharacterAvater in the scene (the one you just modified).
 +  * Set the "Load Path" to **CharacterRecipes** (or the folder name for recipes you created above).
 +  * 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. 
  
-== View your handiwork! == 
  
-* 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 +{{:prefab2.png?​nolink|}}
-* (NoteI actually saved a version with the helmet on)+
  
  
 +==== View your handiwork! ====
 +----
 +  * While in edit mode, drag the new dwarf prefab into the scene in several places, positioning and rotating as needed, and press play.
 +  * See your new dwarf everywhere you placed him.
 +//Note: I actually saved a version with the helmet on//
  
-[[File:Creating a Prefab-3.jpg]]+{{:prefab3.png?​nolink|}}
  
knowledgebase/creating_a_customizable_prefab.1547765060.txt.gz · Last modified: 2019/01/17 23:44 by jaimi