LogoLogo
  • 🌍Welcome
    • 🀝Support & Community
    • ❓FAQ
  • QuickStart
    • πŸ•ΊAnimate Anything Quickstart
      • πŸ’ͺGetting the Best Possible Results for your Model
      • ⁉️FAQ
      • πŸ€Έβ€β™‚οΈAnimations by Category
    • πŸ¦†Generate Anything Quickstart
      • πŸ₯‡Best Practices for Best Results
      • ⁉️FAQ
      • πŸ’«Expected Results by Category
    • πŸƒβ€β™‚οΈUnity Quickstart
      • πŸ”Anything Browser
      • 🌍My World
      • πŸ€–AI Creator
    • 🚲Unreal Library Quickstart
      • 🍎MacOS Installation
      • πŸ€–AI Creator
      • πŸ“¦Importing models in a packaged project
      • 🚢Animate Anything
    • ⛰️Unreal Procedural Environments Quickstart
  • Unity
    • πŸ“¦Download SDK
      • πŸ““Unity Release Notes
        • Anything World for Unity v1.1.0.2
        • Anything World for Unity v1.1.0.1
        • Anything World for Unity v1.0.2.5
        • Anything World for Unity v1.0.2.4
        • Anything World for Unity v1.0.2.3
        • Anything World for Unity v1.0.2.2
        • Anything World for Unity v1.0.2.1
        • Anything World for Unity v1.0.2.0
        • Anything World for Unity v1.0.1.0EA
        • Anything World for Unity v1.0.0.1EA
        • Anything World for Unity v1.0.0.0EA
        • Anything World for Unity v3.1.20.1
        • Anything World for Unity v3.1.20
        • Anything World for Unity v3.1.19
        • Anything World for Unity v3.1.18
        • Anything World for Unity v3.1.17
        • Anything World for Unity v3.1.16
        • Anything World for Unity v3.1.15
      • βš™οΈTroubles Updating? Upgrade Guide
    • πŸ“„Documentation
      • 🌐AnythingWorld API
        • AnythingAnimate
          • βš™οΈAnimate
          • βš™οΈPoll
        • AnythingMaker
          • βš™οΈMake
        • RequestParameter
          • AddCollider
          • AddRigidbody
          • AddScripts
          • ClampDatabaseScale
          • IsAnimated
          • LegacyAnimatorInEditorOption
          • OnFailAction
          • OnSuccessAction
          • Parent
          • PlaceOnGrid
          • PlaceOnGround
          • Position
          • Rotation
          • Scale
          • ScaleMultiplier
          • ScaleType
          • SerializeAsset
          • SetDefaultBehaviourPreset
          • TransformSpace
        • 🌐Voice
          • CommandRequester
            • RequestCommand
            • RequestAndReturnCommand
        • 🌐Utilities
          • UtilityEnum
            • ScaleType
        • 🌐Animation
          • LegacyAnimationController
            • MovementJumpLegacyController
              • BlendAnimationOnSpeed
              • Idle
              • JumpStart
              • JumpFall
              • Land
              • Run
              • Walk
            • FlyingAnimationController
              • Fly
              • Idle
            • CrossFadeAnimation
            • PlayAnimation
            • StopAnimations
            • Wait
      • Behaviour Tree Editor
        • What is a Behaviour Tree?
        • How to use Behaviour Tree Editor
      • Path Creator
      • πŸ”¨Building Your Project
    • πŸ“šTutorials
    • πŸƒLegacy vs. Modern Animation System
    • ❗Known Issues
  • Unreal
    • πŸ“”Unreal Release Notes
      • Anything World for Unreal v1.2.0.0EA
      • Anything World for Unreal v1.1.0.0EA
    • πŸ“–Unreal Plugin Codebase: Intro and FAQs
    • πŸ”¬Packaged project runtime loading of AW models
  • REST API
    • πŸ“„Documentation
    • βš’οΈService Status
    • πŸ’…Preparing your 3D model
  • Unity Legacy Documentation
    • πŸ§“Legacy Package API References
      • πŸ“„API References (Legacy)
        • AnythingCreator
        • AnythingSpeech
        • AnythingHabitat
      • ❓Troubleshooting (Legacy)
    • πŸƒUnity Quickstart - Classic Version
    • 🎀Voice Creator - Classic Version
    • πŸ‘“Examples
  • Animate Anything 3D software plugins
    • 🧊Animate Anything Blender Add-on Manual
    • 🧊Animate Anything Maya Plugin Manual
    • 🧊Animate Anything 3D Studio Max Plugin Manual
    • 🧊Animate Anything Roblox Plugin Manual
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Unity
  2. Documentation
  3. AnythingWorld API

AnythingAnimate

AnythingWorld.AnythingAnimate

Static Methods

Allows the user to send a model to be rigged and animated through Animate Anything directly through Unity.

Allows the user to poll for a model's current state in the Animate Anything processing pipeline.

Description

A class that provides methods for interfacing with Animate Anything directly in Unity.

Example

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;

    private void Start() 
    {
        AnimateMyModel();
    }

    public void AnimateMyModel()
    {
        AnythingAnimate.Animate(
            myModelPath, 
            myExtraAssetsPath,
            myModelName,
            myModelType,
            authorName,
            myModelLicense,
            myModelSymmetry,
            myModelUsedForImprovement,
            PollMyModel,
            PrintDebugWhenAnimateFail)
    }
    
    // This function will be invoked if the model has successfully been sent to Animate Anything
    public void PollMyModel(string ID)
    {
        AnythingAnimate.Poll(
            PrintDebugWhenPollSuccessful,
            PrintDebugWhenPollFail,
            PrintDebugWhenPoll,
            ID);
    }
    
    // This function will be invoked if the model has successfully been animated by Animate Anything
    public void PrintDebugWhenPollSuccessful(ModelJson details)
    {
        Debug.Log("Model successfully animated!");
        AnythingMaker.Make(details);
    }
    
    // This function will be invoked if an error was encountered in animating the model
    public void PrintDebugWhenPollFail(string code, string message)
    {
        Debug.LogError("Could not animate model!");
    }
    
    // This function will be invoked whenever the model is polled for
    public void PrintDebugWhenPoll(string code, string message, int seconds)
    {
        Debug.Log("Polling for update on my model!");
    }
    
    // This function will be invoked if an error was encountered in sending the file to Animate Anything
    public void PrintDebugWhenAnimateFail(string ID, UnityWebRequest error)
    {
        Debug.LogError("Could not send model to be animated!");
    }
}
PreviousAnythingWorld APINextAnimate

Last updated 9 months ago

Was this helpful?

πŸ“„
🌐
Animate
Poll