Live2Dの動的ロードのために、モデルにアタッチされたAnimatorにスクリプト側からAnimatorControllerを設定していたのですが、なぜかビルドすると「
The type or namespace name `UnityEditor’ could not be found. Are you missing a using directive or an assembly reference? 」という、using UnityEditorは使えないよという感じのエラーが出てしまいます。
色々調べてみると、どうやらスクリプト側でAnimatorControllerを扱う時は
エディタで実行する場合はAnimatorControllerクラスでよいのですが、ビルドする場合はRuntimeAnimatorController というクラスを使う必要があったようです。
UnityでAnimatorControllerを使うとビルドに失敗する件
![](http://patio.work/wp-content/uploads/2016/12/Official_unity_logo.png)
コメント