Tutorial for Blend Shapes in Unity

  1. Import the FBX file into Unity. You can drag and drop it into the appropriate asset folder.
  2. On the Import Settings file, under the Model tab, make sure that the "Import BlendShapes" button is checked.
    This is an example of what the file will look like:
  3. In the Rig tab, set "Avatar Definition" to "Create From This Model".
    Slime Rig.png
  4. Create an "Animation Controller" for the new slime type, adding in the necessary animations, parameters, and settings to trigger the animation. (Once the controller is made, you can either drag one animation on at a time or you can drop the FBX file onto the controller). For more information about the animator system, visit Unity Docs.
    image-20220224045343590.png image-20220224045521438.png
    An example of a setup animator:
  5. Add the imported FBX file to the scene (I would suggest the art scene for ease of use, regardless of the scene used, the changes to the scene will be deleted after).
  6. Add an Animator component to the new slime in the scene (if not already there) and attach the newly created controller.
  7. Add the SlimeBlendShapes.cs file as a component to the slime.
  8. Continued below.
Last edited:
  1. Above
  2. Above
  3. Above
  4. Above
  5. Above
  6. Above
  7. Above

  8. Open the SlimeBlendShapes.cs file. You can click on the name where it now shows in the inspector (the greyed-out part) to jump to its location in the assets folder.
  9. Find the SlimeBlendShape enum and make sure it includes the necessary BlendShape state(s) and place value(s).
  10. Add the necessary code to UpdateMesh()—see previous code for examples.
    • Use the following if the blend shape goes the entire duration of the animation slimeSkinMeshRend.SetBlendShapeWeight((int)SlimeBlendShape.BlendShapeStateNameEnteredHere, (currentTime / MaxTime) * 100);
  11. If there is code currently used to call the interaction (i.e. Feed()), make sure that the animations are set to trigger there.
  12. Check to see if the animation plays by running the scene and triggering the animation manually via the animator if there is no code to currently call the interaction.
  13. Drag new slime into the appropriate assets folder to create a prefab and delete changes from the current scene.
Last edited: