- Home /
Question by
Alakanu · Jul 31, 2017 at 05:57 PM ·
c#animationeditor-scripting
UnityEditor script, retrieve all the AnimatorControllers
Hello, I have this code which is run before building and before playing a scene:
static void LoadAnimatorsInfo()
{
var GUIDs = AssetDatabase.FindAssets(string.Format("t:{0}", typeof(AnimatorController)));
Utility.Console.Log("HELLO " + GUIDs.Length);
}
I do have AnimatorControllers in my Assets folder but that prints always "HELLO 0". Does anyone knows where am I going wrong?
Comment
Best Answer
Answer by Alakanu · Jul 31, 2017 at 05:59 PM
The error in my code is that I should pass
typeof(T).Name
instead. Thanks me, I am welcome.