---
description: AnythingWorld.AnythingAnimate.Animate
---

# Animate

#### Declaration

```csharp
public static void Animate(GameObject model, string modelName, string modelType, string authorName, string license, bool symmetrical, bool allowSystemImprovement, Action<string> onExport, Action<string, UnityWebRequest> onError)
```

```csharp
public static void Animate(GameObject model, string modelName, string modelType, string authorName, string license, bool symmetrical, bool allowSystemImprovement, Action<string> onExport, Action<string, UnityWebRequest> onError, string additionalAssetsPath = "")
```

#### Parameters

<table data-header-hidden><thead><tr><th width="246.5"></th><th></th></tr></thead><tbody><tr><td><strong>model</strong></td><td>Reference to the model that should be rigged through Animate Anything.</td></tr><tr><td><strong>modelName</strong></td><td>The name of the model when accessed through My World.</td></tr><tr><td><strong>modelType</strong></td><td>The type of the model, as used when determining what skeleton to rig the model as (see the <a href="https://app.anything.world/animation-rigging/system-constraints">FAQ </a>for more details on what types are currently supported).</td></tr><tr><td><strong>authorName</strong></td><td>The name of the original author of the model.</td></tr><tr><td><strong>license</strong></td><td>The license attributed to the model.</td></tr><tr><td><strong>symmetrical</strong></td><td>Flag for determining if the model is symmetrical or not.</td></tr><tr><td><strong>allowSystemImprovement</strong></td><td>Flag asking if the user allows Anything World to use the model for internal improvements. </td></tr><tr><td><strong>onExport</strong></td><td>Function asking the user what to do once the model has been sent to be processed. String parameter outputs the ID of the model.</td></tr><tr><td><strong>onError</strong></td><td>Function to be executed if an error occurs in sending the model to be processed. String parameter outputs the ID of the model if one has been supplied, UnityWebRequest parameter contains the request details such as error codes and messages.</td></tr><tr><td><em><strong>(additionalAssetsPath)</strong></em></td><td>Path to a folder containing any additional assets separate from the original model. If no additional assets are necessary, this can be left empty.</td></tr></tbody></table>

#### Description

Allows you to send a model to be rigged and animated through Animate Anything directly through Unity. If the model is sent to be animated without error, an ID will be generated that can be used to poll the current progress of the model's animation process. This function is Editor only.

This function works from a direct reference to a game object. Please note that the model needs to be of a valid file type (.obj, .fbx, .dae, .gltf, or .glb). Any additional assets uploaded similarly need to be of a valid asset file type (a list of these valid file types, as well as additional constraints can be found [here](../../../../api/preparing-your-3d-model)). The additional assets path must lead to a folder which contains the assets. Ensure that any paths used are relative paths to the Assets folder.

#### Example

{% code overflow="wrap" %}
```csharp
public class MyTestScript : MonoBehaviour 
{
    public GameObject myModel;
    
    string myModelName = "My Model";
    string myModelType = "Human";
    string authorName = "Model Author";
    string myModelLicense = "MIT";
    bool myModelSymmetry = true;
    bool myModelUsedForImprovement = false;

    public void AnimateMyModel()
    {
        AnythingAnimate.Animate(
            myModel,
            myModelName,
            myModelType,
            authorName,
            myModelLicense,
            myModelSymmetry,
            myModelUsedForImprovement,
            PrintDebugWhenSuccessful,
            PrintDebugWhenFail)
    }
    // This function will be invoked if the model has successfully been sent to Animate Anything
    public void PrintDebugWhenSuccessful(string ID)
    {
        Debug.Log("Successfully sent my model to be animated!");
    }
    // This function will be invoked if an error was encountered in sending the file to Animate Anything
    public void PrintDebugWhenFail(string ID, UnityWebRequest error)
    {
        Debug.Log("Could not send my model to be animated!");
    }
}
```
{% endcode %}

***

#### Declaration

```csharp
public static void Animate(string modelPath, string additionalAssetsPath, string modelName, string modelType, string authorName, string license, bool symmetrical, bool allowSystemImprovement, Action<string> onExport, Action<string, UnityWebRequest> onError)
```

#### Parameters

<table data-header-hidden><thead><tr><th width="247.5"></th><th></th></tr></thead><tbody><tr><td><strong>modelPath</strong></td><td>Path to the model that should be rigged through Animate Anything.</td></tr><tr><td><strong>additionalAssetsPath</strong></td><td>Path to a folder containing any additional assets separate from the original model. If no additional assets are necessary, this can be left empty.</td></tr><tr><td><strong>modelName</strong></td><td>The name of the model when accessed through My World.</td></tr><tr><td><strong>modelType</strong></td><td>The type of the model, as used when determining what skeleton to rig the model as (see the <a href="../../../../../quickstart/animate-anything-quickstart/faq#can-the-animate-anything-web-tool-animate">FAQ </a>for more details on what types are currently supported).</td></tr><tr><td><strong>authorName</strong></td><td>The name of the original author of the model.</td></tr><tr><td><strong>license</strong></td><td>The license attributed to the model.</td></tr><tr><td><strong>symmetrical</strong></td><td>Flag for determining if the model is symmetrical or not.</td></tr><tr><td><strong>allowSystemImprovement</strong></td><td>Flag asking if the user allows Anything World to use the model for internal improvements. </td></tr><tr><td><strong>onExport</strong></td><td>Function asking the user what to do once the model has been sent to be processed. String parameter outputs the ID of the model.</td></tr><tr><td><strong>onError</strong></td><td>Function to be executed if an error occurs in sending the model to be processed. String parameter outputs the ID of the model if one has been supplied, UnityWebRequest parameter contains the request details such as error codes and messages.</td></tr></tbody></table>

#### Description

Allows you to send a model to be rigged and animated through Animate Anything directly through Unity. If the model is sent to be animated without error, an ID will be generated that can be used to poll the current progress of the model's animation process.&#x20;

This function uses a path to reference the model. This path needs to be a direct path to the model, including its extension type. Please note that the model needs to be of a valid file type (.obj, .fbx, .dae, .gltf, or .glb). Any additional assets uploaded similarly need to be of a valid asset file type (a list of these valid file types, as well as additional constraints can be found [here](../../../../api/preparing-your-3d-model)). The additional assets path, unlike the model path, must lead to a folder which contains the additional assets. Ensure that the paths used are absolute paths.

#### Example

{% code overflow="wrap" %}
```csharp
public class MyTestScript : MonoBehaviour 
{
    string myModelPath = "C:\Users\User\Desktop\MyModel.fbx"
    string myExtraAssetsPath = "C:\Users\User\Desktop\MyModelAssets"

    string myModelName = "My Model";
    string myModelType = "Human";
    string authorName = "Model Author";
    string myModelLicense = "MIT";
    bool myModelSymmetry = true;
    bool myModelUsedForImprovement = false;

    public void AnimateMyModel()
    {
        AnythingAnimate.Animate(
            myModelPath, 
            myExtraAssetsPath,
            myModelName,
            myModelType,
            authorName,
            myModelLicense,
            myModelSymmetry,
            myModelUsedForImprovement,
            PrintDebugWhenSuccessful,
            PrintDebugWhenFail)
    }
    // This function will be invoked if the model has successfully been sent to Animate Anything
    public void PrintDebugWhenSuccessful(string ID)
    {
        Debug.Log("Successfully sent my model to be animated!");
    }
    // This function will be invoked if an error was encountered in sending the file to Animate Anything
    public void PrintDebugWhenFail(string ID, UnityWebRequest error)
    {
        Debug.Log("Could not send my model to be animated!");
    }
}
```
{% endcode %}
