3
\$\begingroup\$

One can set the Rig / Animation type of an animation to "Generic", "Humanoid", etc.

Screenshot showing animation rig types

How could I check by script if an animation rig has been set to type "Humanoid"?

\$\endgroup\$
1
\$\begingroup\$

Somebody from Unity answered this question to me:

You can check AnimationType in script using Asset Import PostProcessor: https://docs.unity3d.com/ScriptReference/AssetPostprocessor-assetImporter.html

Here is the code showcasing how you would access the AnimationType:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class CustomImportSettings : AssetPostprocessor
{
    void OnPreprocessModel()
    {
        ModelImporter importer = (ModelImporter)assetImporter;
        ModelImporterAnimationType type = importer.animationType;
    }
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .