private void UpdateCache() { GridLayout gridProxy; if (PaintableGrid.InGridEditMode()) { gridProxy = GridPaintingState.scenePaintTarget != null?GridPaintingState.scenePaintTarget.GetComponentInParent <GridLayout>() : null; } else { gridProxy = Selection.activeGameObject != null?Selection.activeGameObject.GetComponentInParent <GridLayout>() : null; } if (gridProxy != m_ActiveGridProxy) { if (m_ActiveGridProxy == null) { // Disable SceneView grid if there is now a GridProxy. Store user settings to be restored. StoreSceneViewShowGrid(false); } else if (gridProxy == null) { RestoreSceneViewShowGrid(); } m_ActiveGridProxy = gridProxy; FlushCachedGridProxy(); SceneView.RepaintAll(); } }
private void UpdateCache() { GridLayout gridProxy = null; if (PaintableGrid.InGridEditMode()) { gridProxy = GridPaintingState.scenePaintTarget != null?GridPaintingState.scenePaintTarget.GetComponentInParent <GridLayout>() : null; } else { gridProxy = Selection.activeGameObject != null?Selection.activeGameObject.GetComponentInParent <GridLayout>() : null; } if (gridProxy != m_ActiveGridProxy) { m_ActiveGridProxy = gridProxy; FlushCachedGridProxy(); } ShowGlobalGrid(!active); }