-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Description
When selecting asset on disk with ulipsyncAnimator this error appear in console and interface is broken.
Animator is not playing an AnimatorController
UnityEngine.StackTraceUtility:ExtractStackTrace ()
uLipSync.uLipSyncAnimatorEditor:DrawParameterListItem (UnityEngine.Rect,int) (at Assets/talespin-core/Plugins/uLipSync/Editor/uLipSyncAnimatorEditor.cs:147)
uLipSync.uLipSyncAnimatorEditor:<DrawAnimatorReorderableList>b__6_1 (UnityEngine.Rect,int,bool,bool) (at Assets/talespin-core/Plugins/uLipSync/Editor/uLipSyncAnimatorEditor.cs:118)
UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:946)
UnityEditorInternal.ReorderableList:DoLayoutList () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:723)
uLipSync.uLipSyncAnimatorEditor:DrawAnimatorReorderableList () (at Assets/talespin-core/Plugins/uLipSync/Editor/uLipSyncAnimatorEditor.cs:130)
uLipSync.uLipSyncAnimatorEditor:OnInspectorGUI () (at Assets/talespin-core/Plugins/uLipSync/Editor/uLipSyncAnimatorEditor.cs:49)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
To prevent this error I would suggest checking if the animator is enabled? Or is there another way to fix this when still able to see and edit the parameters?
if (EditorUtil.Foldout("Animator Controller Parameters", true))
{
++EditorGUI.indentLevel;
if (anim.animator != null && anim.animator.isActiveAndEnabled)
{
DrawAnimatorReorderableList();
}
else
{
EditorGUILayout.HelpBox("Animator is not available! To edit parameters open the prefab or have game object in scene.", MessageType.Warning);
}
--EditorGUI.indentLevel;
EditorGUILayout.Separator();
}
Metadata
Metadata
Assignees
Labels
No labels