LoginSignup
4

More than 5 years have passed since last update.

Editor ScriptでAnimationController作成

Last updated at Posted at 2014-04-28

以下の処理でGUIでAnimationをPrefabにD&Dした際の挙動を再現できました。
これでAnimationClipをくっつけたPrefabを生成する作業をScriptで自動化できそうです。

using UnityEditorInternal;

AnimatorController iController = AnimatorController.CreateAnimatorControllerAtPathWithClip (string path, AnimationClip clip);

RuntimeAnimatorController controller = iController as RuntimeAnimatorController;
animator.runtimeAnimatorController = controller;

UnityEditorInternalなんてあったのですね。Document化して欲しいものです。。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4