Getting Started

Introduction

Installation

Project Configuration

Testing in Your Sandbox

Samples & Examples

Core Concepts & Glossary

Package Types

Spaces & Space Templates

Custom Avatars

Custom Avatar Animations

Avatar Attachments

Custom Prefab Objects

Embedded Packages

Drivable Vehicles

Scene Setup

Testing In Unity vs Sandbox

Controlling the Camera

Custom Collision, Layers, and Tags

Audio Mixers and Groups

Key Differences from Standard Unity3D development

Economy

Quests and Rewards

Economy Overview

Monetization

Custom Avatar Animations

<aside> <img src="/icons/book_gray.svg" alt="/icons/book_gray.svg" width="40px" /> This component allows for defining a custom avatar animation, such as an emote, to be used in Spatial. This is to be used in conjunction with the Avatar Animation package type, which you can reference in the package configuration.

</aside>

How To Use

<aside> ⚙ Find examples of custom avatar animations in the Starter Template

</aside>

Example emote being played within the sandbox

Example emote being played within the sandbox

  1. Import a rigged, humanoid 3D model (preferably .fbx format) with animation data into Unity. Ensure that the Animation Type under the Rig tab is set to Humanoid

    <aside> ♻️ If you have created a custom avatar that has animations embedded into the 3D model, then you can re-use them directly here without needing to import it again.

    </aside>

    <aside> 💡 There does not need to be any mesh attached to the model, only the animations and rig are necessary (as shown in the screenshot and video below). This will save space and help your animation load faster!

    </aside>

    Untitled

  2. Double check that you have set it up correctly by expanding the 3D model and previewing the desired animation.

    animation.mp4

  3. Create an empty prefab and add the Spatial Avatar Animation component. Drag the animation clip (standing_arguing under the 3D model in the screenshot below) into the Target Clip field inside the prefab.

    Untitled

  4. Create a new Avatar Animation package under Project Configuration and drag the empty prefab into the Prefab field.

You will also need to supply a thumbnail of size 512x512 in an uncompressed format, as seen in the second screenshot.

![Untitled](<https://s3-us-west-2.amazonaws.com/secure.notion-static.com/275ca9a4-fbc5-40bc-92bb-d7201e9bee71/Untitled.png>)

![Import settings of avatar animation thumbnail](<https://s3-us-west-2.amazonaws.com/secure.notion-static.com/fe568b30-b6ff-4fdc-ac86-225a863a62f4/Untitled.png>)

Import settings of avatar animation thumbnail
  1. To test this package, make sure it is the “active package” inside the project configuration panel and then press the Test Active Package button inside the main toolbar.

    Untitled.png

Limitations

Only Humanoid rigs are supported. This is so that the animations can be compatible with any other custom avatars and Spatial’s built-in avatars.


← Previous

Custom Avatars

Next →

Custom Prefab Objects