예제 #1
0
        public static void Init(CharAnimationController animCtrl)
        {
            // Get existing open window or if none, make a new one:
            CharAnimationWindow window = (CharAnimationWindow)EditorWindow.GetWindow(typeof(CharAnimationWindow), false, "Char. Animation");

            if (animCtrl.CreateSpriteFrames())
            {
                window.m_gridSize = animCtrl.GetSpriteFrames()[0].rect.width / 4;
            }
            window.m_animCtrl = animCtrl;
            window.Show();
        }