Как сделать тайлсет для unity

Creating Tilemaps

A Tilemap is a GameObject you place your selected Tiles on. Create a default (rectangular) Tilemap A GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary by going to GameObject > 2D Object > Tilemap. If you do not have these options, then the 2D Tilemap Editor package may not be installed. If so, download the 2D Tilemap Editor package from the Package Manager.

Select the ‘Tilemap’ option to create the default rectangular Tilemap. Refer to the respective pages for Hexagonal and Isometric Tilemaps for more information on their uses and their options.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

The child Tilemap is comprised of a Tilemap component and Tilemap Renderer component. The Tilemap GameObject is where the Tiles are painted on.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

Create additional Tilemaps by selecting the Grid GameObject or the Tilemap GameObject, and then go to the menu: GameObject The fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary > 2D Object A 2D GameObject such as a tilemap or sprite. More info
See in Glossary > Tilemaps, or right-click on the selected GameObject and go to 2D Object > Tilemap to add another Tilemap as a child to the same parent Grid.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

Once the Tilemap(s) are created, adjust the Grid property settings to adjust the properties of its Tilemap children, such as Cell Size or the type of layout of the child Tilemaps. These also affects attached components such as the Tilemap Renderer and Tilemap Collider 2D components.

Источник

Tilemap

The Tilemap component is a system which stores and handles Tile Assets for creating 2D levels. It transfers the required information from the Tiles placed on it to other related components such as the Tilemap Renderer and the Tilemap Collider 2D

Download the 2D Tilemap Editor package via the Package Manager, as it is not included in the Unity Editor default installation.

When you create a Tilemap, the Grid component is automatically parented to the Tilemap and acts as a guide when you lay out Tiles onto the Tilemap.

To create, modify, and pick the Tiles for painting onto a Tilemap, use the Tile Palette (menu: Window > 2D > Tile Palette) and its tools. Refer to the documentation on Tile Palette and Painting Tilemaps for more information.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unityTilemap property window

PropertyFunction
Animation Frame RateThe rate at which Unity plays Tile animations. Increasing or decreasing this changes the speed by the equivalent factor (for example, if you set this to 2, Unity plays Tile animations at double the speed).
ColorSelect a color to apply as a tint to the Tiles on this Tilemap. Set to white (default color) to have Unity render the Tiles without tint.
Tile AnchorEnter the amount (in cells) along the XYZ axes to offset Tile anchor positions on the Tilemap.
OrientationSelect the orientation of Tiles on the Tilemap. Use this if you need to orientate Tiles along a specific plane.
XYUnity orients Tiles along the XY plane.
XZUnity orients Tiles along the XZ plane.
YXUnity orients Tiles along the YX plane.
YZUnity orients Tiles along the YZ plane.
ZXUnity orients Tiles along the ZX plane.
ZYUnity orients Tiles along the ZY plane.
CustomSelect this option to enable the custom orientation settings below.
PositionSet the position offset of the custom orientation. This option is disabled by default and is enabled when the Tilemap’s Orientation is set to Custom.
RotationSet the rotation of the custom orientation. This option is disabled by default and is enabled when the Tilemap’s Orientation is set to Custom.
ScaleSet the scale of the custom orientation. This option is disabled by default and is enabled when the Tilemap’s Orientation is set to Custom.

2D extras in GitHub

You can download examples of scripted Tiles A simple class that allows a sprite to be rendered on a Tilemap. More info
See in Glossary and Brushes from the 2D Extra GitHub repository. Example projects with these scripted GameObjects The fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary are available in the 2D Techdemos Github repository. For descriptions of the different scripts A piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary and usage information, refer to the README.md for each repository.

Источник

Tile Palette

Create Palettes with selected Tiles in the Tile Palette window, which are used to paint on Tilemaps. Open the Tile Palette window from the menu: Window > 2D > Tile Palette.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

Create a new Palette by selecting Create New Palette.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unityCreate New Palette button

In the Create New Palette window are the following options.

Свойство:Функция:
NameProvide a name for the created Tile Palette Asset.
GridSelect the Grid layout the created Tile Palette will be used to paint on.
RectangleSelect this if creating a Palette for the default rectangular Tilemap.
HexagonSelect this when creating a Palette for a Hexagonal Tilemap.
IsometricSelect this when creating a Palette for a Isometric Tilemap. Refer to Creating a Tile Palette for an Isometric Tilemap for more information.
Isometric Z as YSelect this when creating a Palette for a Isometric Z as Y Tilemap. Refer to Creating a Tile Palette for an Isometric Tilemap for more information.
* Hexagon Type
(only available when the Hexagon Grid type is selected)
Select the type of Hexagonal Tilemap that the Palette will be used to paint on. Refer to the documentation on Hexagonal Tilemaps for more information.
Cell SizeThe size of a cell that the Tiles are painted on.
AutomaticThe Cell Size is automatically set in Unity units and based on the size of the Sprite used to create the Tile Assets. If there are multiple Tiles, the Cell Size is adjusted to match the first Tile from the bottom left of the Palette, so that it fits exactly on a cell.
ManualSelect this option to input custom size values.

Provide a name for the Palette and select the Create button. Select a folder to save the Palette. The newly created Palette is automatically loaded.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unityBlank Tile Palette

Drag and drop Textures or Sprites from the Assets folder onto the Tile Palette. Choose where to save the new Tile Assets. New Tile Assets are generated in the selected folder and the Tiles are placed on the Tile Palette.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

Use the following shortcuts to navigate the Palette window.

ShortcutФункция:
Click a TileSelects the Tile
Drag over multiple TilesSelects multiple Tiles
Alt + Left button dragPan (перемещение камеры сцены)
Wheel button dragPan (перемещение камеры сцены)
Rotate the wheel buttonZoom in/out

Z Position Editor

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

At the bottom of the Tile Palette window is the Z Position brush editor. This allows the editing of the Z-axis values of Tiles, which can be used to adjust Tile heights when painting on a Z as Y Tilemap. Refer to the documentation on Adjusting the Tile height in the Palette for more information.

Editing the Tile Palette

The Palette tools used to paint Tiles onto Tilemaps can also be used to edit the placement of Tiles in the Palette itself. Select a Palette from the drop-down menu, then click Edit to unlock the Palette for editing.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity

Refer to the documentation on Painting on Tilemaps for the shortcuts and functions of the Palette tools which can also be used to edit the Palette.

Источник

Tilemap

The Tilemap component is a system which stores and handles Tile Assets for creating 2D levels. It transfers the required information from the Tiles placed on it to other related components such as the Tilemap Renderer and the Tilemap Collider 2D.

Use this component with the Grid component, or a parent Grid GameObject, to lay out Tiles on the associated Grid. When creating a Tilemap (menu: GameObject > 2D Object > Tilemap), Unity automatically creates a Grid GameObject and sets it as the parent of a child Tilemap GameObject.

To modify and place Tiles onto a Tilemap, open the Tile Palette (menu: Window > 2D > Tile Palette). Refer to the documentation on Tile Palette and Painting Tilemaps for more information.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unityTilemap property window

Свойство:Функция:
Animation Frame RateThe rate at which Unity plays Tile animations. Increasing or decreasing this changes the speed by the equivalent factor (for example, if you set this to 2, Unity plays Tile animations at double the speed).
ColorTints the Tiles on this Tilemap with the selected Color. When set to white, Unity renders the Tiles with no tint.
Tile AnchorThe anchoring offset of a Tile on this Tilemap. Adjust the position values to offset the cell position of the Tile on the associated Grid.
ИдентификацияThe orientation of Tiles on the Tilemap. Use this if you need to orientate Tiles on a specific plane (particularly in a 3D view).
XYUnity orients tiles on the XY plane.
XZUnity orients tiles on the XZ plane.
YXUnity orients tiles on the YX plane.
YZUnity orients tiles on the YZ plane.
ZXUnity orients tiles on the ZX plane.
ZYUnity orients tiles on the ZY plane.
CustomUnity lays out tiles based on the custom orientation matrix settings set by the parameters below, which become editable when you select this option.
PositionDisplays the position offset of the current orientation matrix.
You can only edit this property when the Tilemap’s Orientation is set to Custom.
RotationRotation of the current orientation matrix.
You can only edit this property when the Tilemap’s Orientation is set to Custom.
ScaleScale of the current orientation matrix.
You can only edit this property when the Tilemap’s Orientation is set to Custom.

Tilemap Workflow

Below is the general workflow to create and paint a Tilemap:

Unity also supports specialized types of Tilemaps such as Hexagonal and Isometric Tilemaps. Refer to the documentation on their respective pages for their specific workflows.

2D extras in GitHub

You can download examples of scripted Tiles and Brushes from the 2D Extra GitHub repository. Example projects with these scripted GameObjects are availalbe in the 2D Techdemos Github repository. For descriptions of the different scripts and usage information, refer to the README.md for each repository.

Источник

Creating Tiles

Importing and preparing Sprites for Tile Assets

Import the individual Tiles or Tileset images for your Tilemap A GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary into your Unity Project by placing the Textures into the Assets folder. Select the imported images to view their Texture Importer settings in the Inspector A Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary window.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity
Sprite Importer settings.

When importing Sprites for use in a Tilemap, use the following recommended settings. For further information about each setting, refer to the documentation on Texture Type: Sprite (2D and UI).

Generating Tile Assets automatically in the Tile Palette

Tiles can be automatically generated by bringing the individual Sprites or Sprite sheets of the Tiles directly into the Tile Palette window (if the window is not open, go to Window > 2D > Tile Palette).

First prepare and import the Tile Sprites, then open the ‘New Palette’ drop-down menu in the Tile Palette window. Select an existing Tile Palette from the list, or select ‘Create New Palette’ to open the Create New Palette dialog box.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity
The New Palette drop-down menu.

After selecting the properties of the Tile Palette (refer to the Tile Palettes documentation for more information about the different options), select Create to open the new Palette in the window.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity
Select ‘Create’ to create a new Tile Palette.

After creating or loading a Palette, drag and drop Textures or Sprites from the Assets folder directly onto the Tile Palette window. You will be prompted for the save location for the new Tile Assets. Select the save location, and the new Tile Assets are generated in the selected folder. The generated Tiles are also automatically placed onto the Palette.

Как сделать тайлсет для unity. Смотреть фото Как сделать тайлсет для unity. Смотреть картинку Как сделать тайлсет для unity. Картинка про Как сделать тайлсет для unity. Фото Как сделать тайлсет для unity
Tile Asset credit to Kenney

Deleting Tile Assets

When you delete Tile Assets, they are replaced by placeholder Tiles made of a white square tinted with various shades of pink. The placeholder Tiles are placed on the Tilemaps in the original positions of the deleted Tile Assets.This helps to identify Tile Assets which have been deleted in a project, whether intentionally or accidentally.

Each deleted Tile Asset has a corresponding placeholder Tile with a unique shade of pink that differentiates the placeholders from each other. You can replace these placeholder Tiles with another Tile by using the Flood Fill tool or remove them.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *