Contents
Operating environment
This tutorial is created in the following environment.
Unity | 2019.4.31f1 |
Nostalgia | 2.2.0 |
Depending on the version, please understand that there are parts different from the explanation.
Create tutorial project
First of all, please create a project for the tutorial.
Project Name | NostalgiaTutorial01 |
Templetes | 2D |
Assets to import | Nostalgia |
For information on creating projects and importing Nostalgia, please refer to “Preparation for using Nostalgia”.
TileSet texture preparation
Create a folder to put the TileSet
First, create a folder to put the TileSet.
- Select the Assets folder from the Project window.
- Click the + button in the Project window.
- Select “Folder” from the menu.
- Set the name to “TileSets”.
Download tutorial material
This time, we have prepared the materials used for the TileSet in advance.
Please download and unzip from the button below.
“Tutorial01” をダウンロード
NostalgiaTutorial1.zip – 1242 回のダウンロード – 46.84 KB(The material was borrowed from https://ci-en.net/creator/1430.)
Import TileSet textures
Next, import the texture for TileSet.
- Select the TileSets folder in the Project window.
- Drag and drop the downloaded tutorial material Dungeon.png to the TileSets folder
TileSet texture settings
Set the imported Dungeon texture.
- Select the Dungeon texture from the Project window.
- Set as follows in the Inspector window.
Texture Type Sprite (2D and UI) Sprite Mode Multiple Pixels Per Unit 32 Filter Mode Point (no filter) - Click the Sprite Editor button.
- Click the Apply button when the “Unapplied import settings” dialog is displayed.
Sprite settings
- Click the Slice dropdown in the Sprite Editor window.
- Set as follows and click the Slice button.
Type Grid By Cell Size Pixel Size X: 32, Y: 160 Offset X: 0, Y: 0 Padding X: 0, Y:0 Keep Empty Rects オフ Pivot Center Method Delete Existing - Drag the bottom edge of the Dungeon_6 and Dungeon_7 sprites to resize
(Or set to Y: 224, H: 32) - Click the Apply button in the Sprite Editor window.
- Close the Sprite Editor window.
TileSet Asset Preparation
Creating a TileSet asset
Create a TileSet asset that uses a Dungeon texture.
- Select the Dungeon texture from the Project window.
- Click the + button in the Project window.
- Select “Nostalgia > TileSet from selected Texture or Material” from the menu.
TileSet Asset Settings
Set tiles for TileSet assets.
Import from Sprite
Import each sprite of the Dungeon texture and set the Tile.
- Select the Dungeon tile set.
- Open Import from sprites in the Inspector window.
- Click the Check All button at the bottom.
- Uncheck Dungeon_4 and Dungeon_5 because they are animation tiles.
- Click the Import button.
- Close Import from sprites.
Tile settings
Set the details for each tile.
Dungeon_0 (floor)
Bordered floor of auto tile
- Select the very first tile (Dungeon_0) from Tiles.
- Change Type to “Auto Floor Wolf”.
- Change the Combination Group Name to “Floor”.
Dungeon_1 (wall)
Auto tile wall
- Select the second tile (Dungeon_1) from Tiles.
- Change Type to “Auto Floor Wolf”.
- Change Tile Collider to “Tile Box Collider”.
Dungeon_2 (ceiling)
Auto tile ceiling
- Select the third tile (Dungeon_2) from Tiles.
- Change Type to “Auto Floor Wolf”.
- Change the Combination Group Name to “Ceiling”.
- Change Tile Collider to “Tile Box Collider”.
Dungeon _3 (Water)
Animated water for auto tiles
- Select the 4th tile (Dungeon_3) from Tiles.
- Change Type to “Auto Floor Wolf”.
- Change Animation to 3.
- Change Tile Collider to “Tile Box Collider”.
Dungeon_6 (black ceiling)
Black single color tile that can be connected to Dungeon_2 (ceiling)
- Select the 5th tile (Dungeon_6) from Tiles.
- Change the Combination Group Name to “Ceiling”.
- Change Tile Collider to “Tile Box Collider”.
Dungeon_7 (borderless floor)
Borderless floor that can be connected to Dungeon_0 (floor)
- Select the 6th tile (Dungeon_7) from Tiles.
- Change the Combination Group Name to “Floor”.
Trial painting
After completing the settings, try painting.
- Click the + button in the Hierarchy window.
- Select “Nostalgia Map” from the menu.
- Changed Tile Set of Map component to “Dungeon Tile Set”.
- Click the Open Editor button.
- Select the pencil tool.
- Select the tile to place from Tiles.
- Left button drag the Map area of the Scene window.
- Check if there is a problem with the settings of each tile.
- Click the Play button and check the animation of Dungeon_3 (Water).