示例#1
0
    public void OnDisable()
    {
        if (!EditorApplication.isPlayingOrWillChangePlaymode)
        {
            pg_GridRenderer.Destroy();
        }

        EditorApplication.hierarchyWindowChanged -= HierarchyWindowChanged;

        instance = null;

        SceneView.RepaintAll();
        SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
    }
示例#2
0
    public void OnEnable()
    {
        pg = this;

        HookSceneView();
        LoadGUIResources();
        LoadPreferences();
        autoRepaintOnSceneChange = true;
        SetSharedSnapValues(snapEnabled, snapValue);

        toggleStyle.alignment = TextAnchor.MiddleCenter;

        this.minSize = new Vector2(BUTTON_SIZE + 4, WINDOW_HEIGHT);
        this.maxSize = new Vector2(BUTTON_SIZE + 4, WINDOW_HEIGHT);
    }
示例#3
0
    public void OnEnable()
    {
        instance = this;

        HookSceneView();
        LoadGUIResources();
        LoadPreferences();
        autoRepaintOnSceneChange = true;

        EditorApplication.hierarchyWindowChanged += HierarchyWindowChanged;

        this.minSize = new Vector2(BUTTON_SIZE + 4, WINDOW_HEIGHT);
        this.maxSize = new Vector2(BUTTON_SIZE + 4, WINDOW_HEIGHT);

        gridRepaint = true;
        SceneView.RepaintAll();
    }
示例#4
0
    public void OnEnable()
    {
                #if DEBUG
        pivotGo             = new GameObject();    //GameObject.CreatePrimitive(PrimitiveType.Cube);
        scenePivotGo        = new GameObject();    //GameObject.CreatePrimitive(PrimitiveType.Cube);
        scenePlaneIntercept = new GameObject();    //GameObject.CreatePrimitive(PrimitiveType.Cube);
                #endif

        instance = this;

        HookSceneView();
        LoadGUIResources();
        LoadPreferences();
        autoRepaintOnSceneChange = true;
        SetSharedSnapValues(snapEnabled, snapValue);
        this.minSize = new Vector2(BUTTON_SIZE + 4, WINDOW_HEIGHT);
        this.maxSize = new Vector2(BUTTON_SIZE + 4, WINDOW_HEIGHT);

        gridRepaint = true;
        SceneView.RepaintAll();
    }
示例#5
0
	public void OnEnable()
	{
		#if DEBUG
		pivotGo = new GameObject();//GameObject.CreatePrimitive(PrimitiveType.Cube);
		scenePivotGo = new GameObject();//GameObject.CreatePrimitive(PrimitiveType.Cube);
		scenePlaneIntercept = new GameObject();//GameObject.CreatePrimitive(PrimitiveType.Cube);
		#endif

		instance = this;

		pg_GridRenderer.Init();
		
		HookSceneView();
		LoadGUIResources();
		LoadPreferences();
		autoRepaintOnSceneChange = true;
		SetSharedSnapValues(snapEnabled, snapValue);
		this.minSize = new Vector2(BUTTON_SIZE+4, WINDOW_HEIGHT);
		this.maxSize = new Vector2(BUTTON_SIZE+4, WINDOW_HEIGHT);

		SceneView.RepaintAll();
	}