Ejemplo n.º 1
0
    public void OnGUI()
    {
        EditorGUILayout.LabelField("Add KeyFrame");

        EditorGUILayout.BeginHorizontal();
        for (int i = -2; i < 0; ++i)
        {
            if (GUILayout.Button(""))
            {
                AnimationTweenHelper.CurveEditorAddKey(i / 10f);
                AnimationTweenHelper.AnimEditorRepaint();
            }
        }
        EditorGUILayout.Space();
        for (int i = 0; i < 11; ++i)
        {
            if (GUILayout.Button(""))
            {
                AnimationTweenHelper.CurveEditorAddKey(i / 10f);
                AnimationTweenHelper.AnimEditorRepaint();
            }
        }
        EditorGUILayout.Space();
        for (int i = 11; i < 13; ++i)
        {
            if (GUILayout.Button(""))
            {
                AnimationTweenHelper.CurveEditorAddKey(i / 10f);
                AnimationTweenHelper.AnimEditorRepaint();
            }
        }
        EditorGUILayout.EndHorizontal();
    }
Ejemplo n.º 2
0
    public static void DoWindow()
    {
        AnimationTweenHelper.Init();
        var window = GetWindowWithRect <AnimationTweenToolEditor>(new Rect(0, 0, 300, 80), false, "Animation Tween Tool");

        window.Show();
    }