Class GridPaletteUtility
Utility Class for creating Palettes
Inherited Members
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. |
Grid |
layout | Grid Layout of the Palette Asset. |
Grid |
cellSizing | Cell Sizing of the Palette Asset. |
Vector3 | cellSize | Cell Size of the Palette Asset. |
Grid |
swizzle | Cell Swizzle of the Palette. |
Returns
Type | Description |
---|---|
Game |
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. |
Grid |
layout | Grid Layout of the Palette Asset. |
Grid |
cellSizing | Cell Sizing of the Palette Asset. |
Vector3 | cellSize | Cell Size of the Palette Asset. |
Grid |
swizzle | Cell Swizzle of the Palette. |
Transparency |
sortMode | Transparency Sort Mode for the Palette |
Vector3 | sortAxis | Transparency Sort Axis for the Palette |
Returns
Type | Description |
---|---|
Game |
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. |
Grid |
layout | Grid Layout of the Palette Asset. |
Grid |
cellSizing | Cell Sizing of the Palette Asset. |
Vector3 | cellSize | Cell Size of the Palette Asset. |
Grid |
swizzle | Cell Swizzle of the Palette. |
Returns
Type | Description |
---|---|
Game |
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. |
Grid |
layout | Grid Layout of the Palette Asset. |
Grid |
cellSizing | Cell Sizing of the Palette Asset. |
Vector3 | cellSize | Cell Size of the Palette Asset. |
Grid |
swizzle | Cell Swizzle of the Palette. |
Transparency |
sortMode | Transparency Sort Mode for the Palette |
Vector3 | sortAxis | Transparency Sort Axis for the Palette |
Returns
Type | Description |
---|---|
Game |
The created Palette Asset if successful. |