docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GridPaletteUtility

    Utility Class for creating Palettes

    Inheritance
    object
    GridPaletteUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Tilemaps
    Assembly: Unity.2D.Tilemap.Editor.dll
    Syntax
    public static class GridPaletteUtility

    Methods

    CreateNewPalette(string, string, CellLayout, CellSizing, Vector3, CellSwizzle)

    Creates a Palette Asset at the given folder path.

    Declaration
    public static GameObject CreateNewPalette(string folderPath, string name, GridLayout.CellLayout layout, GridPalette.CellSizing cellSizing, Vector3 cellSize, GridLayout.CellSwizzle swizzle)
    Parameters
    Type Name Description
    string folderPath

    Folder Path of the Palette Asset.

    string name

    Name of the Palette Asset.

    GridLayout.CellLayout layout

    Grid Layout of the Palette Asset.

    GridPalette.CellSizing cellSizing

    Cell Sizing of the Palette Asset.

    Vector3 cellSize

    Cell Size of the Palette Asset.

    GridLayout.CellSwizzle swizzle

    Cell Swizzle of the Palette.

    Returns
    Type Description
    GameObject

    The created Palette Asset if successful.

    CreateNewPalette(string, string, CellLayout, CellSizing, Vector3, CellSwizzle, TransparencySortMode, Vector3)

    Creates a Palette Asset at the given folder path.

    Declaration
    public static GameObject CreateNewPalette(string folderPath, string name, GridLayout.CellLayout layout, GridPalette.CellSizing cellSizing, Vector3 cellSize, GridLayout.CellSwizzle swizzle, TransparencySortMode sortMode, Vector3 sortAxis)
    Parameters
    Type Name Description
    string folderPath

    Folder Path of the Palette Asset.

    string name

    Name of the Palette Asset.

    GridLayout.CellLayout layout

    Grid Layout of the Palette Asset.

    GridPalette.CellSizing cellSizing

    Cell Sizing of the Palette Asset.

    Vector3 cellSize

    Cell Size of the Palette Asset.

    GridLayout.CellSwizzle swizzle

    Cell Swizzle of the Palette.

    TransparencySortMode sortMode

    Transparency Sort Mode for the Palette

    Vector3 sortAxis

    Transparency Sort Axis for the Palette

    Returns
    Type Description
    GameObject

    The created Palette Asset if successful.

    CreateNewPaletteAtCurrentFolder(string, CellLayout, CellSizing, Vector3, CellSwizzle)

    Creates a Palette Asset at the current selected folder path. This will show a popup allowing you to choose a different folder path for saving the Palette Asset if required.

    Declaration
    public static GameObject CreateNewPaletteAtCurrentFolder(string name, GridLayout.CellLayout layout, GridPalette.CellSizing cellSizing, Vector3 cellSize, GridLayout.CellSwizzle swizzle)
    Parameters
    Type Name Description
    string name

    Name of the Palette Asset.

    GridLayout.CellLayout layout

    Grid Layout of the Palette Asset.

    GridPalette.CellSizing cellSizing

    Cell Sizing of the Palette Asset.

    Vector3 cellSize

    Cell Size of the Palette Asset.

    GridLayout.CellSwizzle swizzle

    Cell Swizzle of the Palette.

    Returns
    Type Description
    GameObject

    The created Palette Asset if successful.

    CreateNewPaletteAtCurrentFolder(string, CellLayout, CellSizing, Vector3, CellSwizzle, TransparencySortMode, Vector3)

    Creates a Palette Asset at the current selected folder path. This will show a popup allowing you to choose a different folder path for saving the Palette Asset if required.

    Declaration
    public static GameObject CreateNewPaletteAtCurrentFolder(string name, GridLayout.CellLayout layout, GridPalette.CellSizing cellSizing, Vector3 cellSize, GridLayout.CellSwizzle swizzle, TransparencySortMode sortMode, Vector3 sortAxis)
    Parameters
    Type Name Description
    string name

    Name of the Palette Asset.

    GridLayout.CellLayout layout

    Grid Layout of the Palette Asset.

    GridPalette.CellSizing cellSizing

    Cell Sizing of the Palette Asset.

    Vector3 cellSize

    Cell Size of the Palette Asset.

    GridLayout.CellSwizzle swizzle

    Cell Swizzle of the Palette.

    TransparencySortMode sortMode

    Transparency Sort Mode for the Palette

    Vector3 sortAxis

    Transparency Sort Axis for the Palette

    Returns
    Type Description
    GameObject

    The created Palette Asset if successful.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)