Пример #1
0
 public static void showWindow()
 {
     if (instance == null)
     {
         GetWindow <Shapes>();
     }
     else
     {
         instance.Close();
     }
 }
Пример #2
0
    public void OnSceneGUI(SceneView sceneView)
    {
        if (!gotPos)
        {
            buttonHeight -= gapPixel * 2;
            buttonWidth  -= gapPixel * 2;
            center        = getScreenPosition(200, ((float)totalButtons * buttonHeight + (((float)totalButtons + 1) * gapPixel)));

            startMousePosition = Event.current.mousePosition;
            circleTex          = (Texture2D)AssetDatabase.LoadAssetAtPath("Assets/Editor/Circle.png", typeof(Texture2D));
            whiteMat           = (Material)AssetDatabase.LoadAssetAtPath("Assets/Editor/White.mat", typeof(Material));


            gotPos = true;
        }

        //HandleScrollBarView();
        HandleCircularView();

        if (Event.current.type == EventType.MouseDown)
        {
            parentWindow.Close();
        }

        SceneView.RepaintAll();
    }