Exemplo n.º 1
0
    public static void Init()
    {
        selectedObject = Selection.activeObject;

        if (selectedObject == null)
        {
            return;
        }

        CreateAnimations window = (CreateAnimations)EditorWindow.GetWindow(typeof(CreateAnimations));

        window.Show();
    }
Exemplo n.º 2
0
    static void Init()
    {
        //Grab the active object
        selectedObject = Selection.activeObject;

        //If the object doesn't exist, do nothing
        if (selectedObject == null)
        {
            return;
        }

        //Otherwise, create a new window
        CreateAnimations window = (CreateAnimations)EditorWindow.GetWindow(typeof(CreateAnimations));

        //Show the window
        window.Show();
    }
Exemplo n.º 3
0
    public void OnGUI()
    {
        GUILayout.Label("Frame Rate");
        frameRateStr = GUILayout.TextField(frameRateStr);

        var go = GUILayout.Button("Go");

        if (go)
        {
            int frameRate;
            if (!int.TryParse(frameRateStr, out frameRate))
            {
                frameRate = 1;
            }
            // Undo.RegisterCompleteObjectUndo(c, "Create Animations");
            CreateAnimations.CreatePlayerIdle();
            CreateAnimations.CreatePlayerSwordAttack1();
        }
    }