Beispiel #1
0
        public override void OnInspectorGUI()
        {
            BallAnimation anim = target as BallAnimation;

            // Add a button to generate points from the given animation's path
            if (GUILayout.Button("Generate"))
            {
                anim.Generate();
                Undo.RegisterCompleteObjectUndo(anim, "Generate");
                EditorUtility.SetDirty(anim);
            }

            // Draw the normal fields and such
            DrawDefaultInspector();
        }