Editor scripts

This package also includes some Editor scripts. Working with scripts for the Unity Editor requires no programming skills. You can find the menu options on the Unity Editor menu bar (Window > Didimo), which is the container of all of our menu scripts.

It should be noted that we have a package with all our features for the Unity Editor. If you are interested in all these features, please visit Using the Editor Plugin

This page continues by describing only the components that we are including in the Unity SDK package.


Step By Step

How to import and/or instantiate a didimo using the menu options

Import Model

  1. Find the menu option to import a didimo into your project assets.

       Window > Didimo > Import didimo
    
  2. Fill in the folder where to find the didimo package and click on Import to start the process. alt text

  1. All the assets are created in the selected folder, inside the project assets.

    alt text

  2. You can now instantiate this model using the same window, as it provides an instantiation button as well. Next, we explain how the instantiation feature works.

Instantiate Model

  1. Find the menu option to instantiate a didimo model from your project assets.

       Window > Didimo > Instantiate didimo
    
  2. Fill in the folder where to find the model and click on instantiate. alt text

NOTE: If you toggle on the option Update only, you will have to add a reference to a game object on the scene holding an instantiated didimo, and the script will update it with the selected model.

alt text


How to change the hairstyle of a didimo using the menu options

Menu Scripts: Add or change the hairstyle and color

  1. Find the menu option to switch a didimo's hairstyle.

       Window > Didimo > Change hairstyle
    

    alt text

  2. Fill in the reference to the didimo instance on the current scene.

  3. Fill in the reference to the didimo's asset folder that you created when importing the didimo into the project assets.

  4. Change the hairstyle by selecting one of the options in the hairstyles dropdown.

  5. Change the hair color by selecting one of the options in the colors dropdown.

  6. The hairstyle with matching color is instantiated in the correct position inside the rig.

Manual Steps: Add or change the hairstyle

The script presented immediately above handles the instantiation of the hairstyle in the correct position inside the rig, and applies the required shader customisation according to the selected color. Next, we describe the steps involved in changing a hairstyle, as a manual alternative, for completeness.

  1. Find the hairstyle prefab options in your project assets.

       Assets > (...Imported didimo folder...)) > HairPrefabs
    
  2. Drag and drop the prefab on the didimo game object in the scene by placing it under the head joint of the rig and reset any transformations, so it is correctly positioned and can follow rig movements.

  3. If you need to change the hairstyle just replace this game object in the scene

  4. Change the hair color

    This method of drag and drop doesn't apply an haircap to the didimo, which may leave some transparency gaps visible. Use the menu option that we described before to "Changing the hairstyle" and apply a color.


Last updated on 2020-10-06