tilemap-palette-create

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Tilemap Palette Creation

Tilemap Palette 创建

Workflow

工作流程

Step 1: Parameter Gathering

步骤1:参数收集

WAIT for the user to specify the following parameters if not already provided:
  • Palette Name: The name of the asset.
  • Grid Type: Rectangular, Hexagonal, or Isometric.
  • Cell Size: Optional (defaults based on Grid Type).
  • Sort Axis: Required for Isometric palettes.
若用户未提供以下参数,请等待用户指定:
  • Palette Name:资源名称。
  • Grid Type:可选Rectangular、Hexagonal或Isometric。
  • Cell Size:可选(默认值根据Grid Type确定)。
  • Sort Axis:Isometric类型的Palette必填。

Step 2: Asset Creation

步骤2:资源创建

Utilise
UnityEditor.Tilemaps.GridPaletteUtility.CreateNewPalette
to create the Tile Palette asset.
使用
UnityEditor.Tilemaps.GridPaletteUtility.CreateNewPalette
创建Tile Palette资源。

Branching Logic (Grid Types)

分支逻辑(Grid 类型)

Path A: Rectangular

路径A:Rectangular

  • Use Automatic cell sizing. Use cell size:
    (1, 1, 0)
    as a default.
  • 使用Automatic单元格大小,默认单元格尺寸为
    (1, 1, 0)

Path B: Hexagonal

路径B:Hexagonal

  • Use cell size:
    (0.8659766, 1, 1)
    .
  • 使用单元格尺寸:
    (0.8659766, 1, 1)

Path C: Isometric

路径C:Isometric

  • Use cell size:
    (1, 0.5, 1)
    .
  • Use a Custom Sort Axis with value
    (0, 0, 1)
    .
  • 使用单元格尺寸:
    (1, 0.5, 1)
  • 使用值为
    (0, 0, 1)
    Custom Sort Axis

Path D: Isometric Z As Y

路径D:Isometric Z As Y

  • Use cell size:
    (1, 0.5, 1)
    .
  • Use a Custom Sort Axis with value
    (0, 0, 1)
    .
  • 使用单元格尺寸:
    (1, 0.5, 1)
  • 使用值为
    (0, 0, 1)
    Custom Sort Axis

Post-Creation

创建后操作

Ensure that there is a
GridPalette
as a sub-asset of the Tile Palette asset.
确保Tile Palette资源下存在一个
GridPalette
子资源。

References

参考资料

Code Template: "scripts/CreatePaletteTemplate.cs"
代码模板:"scripts/CreatePaletteTemplate.cs"