public override void OnInspectorGUI()
    {
#if UNITY_3_5
        EditorGUIUtility.LookLikeInspector();
#endif

        PointCloudGestureTemplate template = target as PointCloudGestureTemplate;

        if (GUILayout.Button("Edit", GUILayout.Height(50)))
        {
            PointCloudGestureEditor.Open(template);
        }

        /*
         * if( GUILayout.Button( "Triangle" ) )
         * {
         *  template.BeginPoints();
         *  template.AddPoint( 0, 1, 1 );
         *  template.AddPoint( 0, 2, 2 );
         *  template.AddPoint( 0, 3, 1 );
         *  template.AddPoint( 0, 1, 1 );
         *  template.EndPoints();
         * }
         *
         * if( GUILayout.Button( "Square" ) )
         * {
         *  template.BeginPoints();
         *  template.AddPoint( 0, 2, 1 );
         *  template.AddPoint( 0, 2, 3 );
         *  template.AddPoint( 0, 4, 3 );
         *  template.AddPoint( 0, 4, 1 );
         *  template.AddPoint( 0, 2, 1 );
         *  template.EndPoints();
         * }*/
    }
    public static PointCloudGestureEditor Open(PointCloudGestureTemplate template)
    {
        PointCloudGestureEditor window = EditorWindow.GetWindow <PointCloudGestureEditor>(true, "Gesture Editor: " + template.name);

        window.maxSize = new Vector2(GestureAreaSize, GestureAreaSize + ToolbarHeight + 22);
        window.minSize = window.maxSize;
        //window.wantsMouseMove = true;
        window.Init(template);
        window.Focus();

        return(window);
    }