private void RenderGrid() { if (this.m_GridMesh == null && this.grid.cellLayout == GridLayout.CellLayout.Rectangle) { this.m_GridMesh = GridEditorUtility.GenerateCachedGridMesh(this.grid, GridPaintPaletteClipboard.k_GridColor, 1f / this.LocalToScreenRatio(), this.paddedBoundsInt, MeshTopology.Quads); } GridEditorUtility.DrawGridGizmo(this.grid, this.grid.transform, GridPaintPaletteClipboard.k_GridColor, ref this.m_GridMesh, ref this.m_GridMaterial); }
private void RenderGrid() { // MeshTopology.Lines doesn't give nice pixel perfect grid so we have to have separate codepath with MeshTopology.Quads specially for palette window here if (m_GridMesh == null && grid.cellLayout == Grid.CellLayout.Rectangle) { m_GridMesh = GridEditorUtility.GenerateCachedGridMesh(grid, k_GridColor, 1f / LocalToScreenRatio(), paddedBoundsInt, MeshTopology.Quads); } GridEditorUtility.DrawGridGizmo(grid, grid.transform, k_GridColor, ref m_GridMesh, ref m_GridMaterial); }