wuxianshengcong/Library/PackageCache/com.unity.2d.aseprite@1.1.6/Editor/Common/InternalBridge/AnimatorControllerHelper.cs
2025-01-02 14:50:41 +08:00

20 lines
538 B
C#

using UnityEditor.Animations;
namespace UnityEditor.U2D.Aseprite.Common
{
internal static class AnimatorControllerHelper
{
[Callbacks.OnOpenAsset]
static bool OnOpenAsset(int instanceID, int line)
{
var controller = EditorUtility.InstanceIDToObject(instanceID) as AnimatorController;
if (controller)
{
EditorApplication.ExecuteMenuItem("Window/Animation/Animator");
return true;
}
return false;
}
}
}