> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viggle.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Unity quickstart

> Install the Viggle Splat Engine in Unity, load a .vsplat character from the API and drive it with a GLB or FBX motion.

The Viggle Splat Engine for Unity (`com.viggle.splat-engine`, MIT license) renders `.vsplat` characters and animates them with standard Unity animation clips. It deforms the splats on the GPU with linear blend skinning: the same workflow as a skinned mesh, without the mesh. The package only renders; you create characters with [3D characters](https://docs.viggle.ai/v1/3d/characters.md) and clips with [3D motion](https://docs.viggle.ai/v1/3d/motion.md).

## Requirements

| Item | Requirement |
| - | - |
| Unity | 2022.3 or newer |
| Render pipeline | Universal Render Pipeline (URP). Built-in and HDRP code paths exist but are untested; treat them as unsupported |
| Desktop | Windows and macOS on D3D11, Metal, Vulkan or OpenGL Core |
| Mobile | iOS on Metal; Android on Vulkan or OpenGL ES 3 |
| Web | WebGL2, through a CPU-sorted render path |
| Files | A `.vsplat` character and an FBX motion from the Viggle API |

## Get your files from the API

**1. Export a character**

Create a character with `type=vsplat` and download it with `GET /v1/characters/{character_id}/export?download_type=vsplat`. Note its `joint_set` (default `body`). See [3D characters](https://docs.viggle.ai/v1/3d/characters.md).

**2. Export a motion as FBX**

Create a motion from video or text and call `GET /v1/motions/{motion_id}/export?download_type=fbx`. Download `metahuman_body_url` for a `body` character, or `metahuman_url` for a `full` character. See [3D motion](https://docs.viggle.ai/v1/3d/motion.md).

## Install and render

**1. Download the package**

Download the tarball (`.tgz`) from the [Splat Engine page](https://viggle.ai/pinoc/app/plugin), Unity tab. Nothing needs unpacking.

**2. Add it to your project**

In Unity open Window → Package Manager, click +, choose Add package from tarball… and select the file. Package Manager then lists `com.viggle.splat-engine`.

**3. Add the renderer feature**

On URP, splats don't draw until Splat Renderer Feature is on the renderer asset your camera uses. Without it the character loads, reports success and still shows nothing. This is the step people miss.

The package can do it for you: add a Skinned Splat Renderer to any GameObject, and its Inspector shows a warning with a button that adds the feature. By hand, select the renderer asset your URP pipeline asset lists, click Add Renderer Feature and pick Splat Renderer Feature.

**4. Load your character**

Drag the `.vsplat` file into your project, then drag the imported asset into the Hierarchy. It renders in its rest pose. If it faces the wrong way, rotate the GameObject on Y.

## Animate it

**1. Import the FBX as Generic**

Copy the FBX into a folder outside `Assets/Samples`, select it and open the Rig tab. Set Animation Type to Generic and Avatar Definition to No Avatar, then click Apply.

**2. Set the character to Generic**

On the `.vsplat` character, set Rig Mode to Generic so the clip drives the bones directly.

**3. Build an Animator Controller**

Right-click in the Project panel, choose Create → Animator Controller and open it. Expand the FBX and drag its Animation Clip (the triangle icon) onto the grid. Drag the clip, not the whole FBX, its Armature or preview meshes. The default state is orange; if yours is gray, right-click it and choose Set as Layer Default State.

**4. Assign it and press Play**

Assign the controller to the character's Skinned Splat Renderer and enter Play mode.

> [!WARNING]
>
> **Humanoid drops the face.** Unity's Humanoid retargeting maps the standard body bones and ignores the facial bones, with no error and no warning. A `full` character whose body moves but whose face never does has a Humanoid import, not a bad export. Humanoid is the package default and is fine for body-only work and for Mixamo or other humanoid clips, as long as the clip and the character use the same mode.

To loop a clip, select the FBX, open the Animation tab, enable Loop Time (and Loop Pose for a smooth seam), click Apply, and don't add a transition from its state to Exit. If the character jumps when the loop restarts, enable Bake Into Pose for the root transform rotation and position.

For several actions, drag more clips into the same controller and switch between them with parameters, for example a `Speed` float for idle and walk and a `Slap` trigger from Any State, with Has Exit Time on the way back to idle.

## Troubleshooting

| Problem | Fix |
| - | - |
| The character loads but nothing draws | Add Splat Renderer Feature to the renderer asset the camera uses. Then check the object is enabled, the camera's Culling Mask and the position |
| The body moves but the face doesn't | The FBX or the character is set to Humanoid. Use Generic on both |
| The FBX preview looks right but the character shakes or twists | The clip's rig mode doesn't match the character's. Use the same mode on both, and a MetaHuman rig that matches the character's `joint_set` |
| The animation plays once and stops | Enable Loop Time and remove any transition to Exit |
| The character jumps at the loop point | Enable Loop Pose and Bake Into Pose for the root transform |

## Next steps

> [card] [3D characters](https://docs.viggle.ai/v1/3d/characters.md)
>
> Parameters, price and the export call for `.vsplat`.

> [card] [3D motion](https://docs.viggle.ai/v1/3d/motion.md)
>
> Motion from video or text, and which rig to download.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.