All Projects → RoryDungan → HexTiles

RoryDungan / HexTiles

Licence: MIT license
Unity Hex Tile Editor

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to HexTiles

UnityHexagonLibrary2d
A library to manage 2D hexagonal tiles in Unity.
Stars: ✭ 58 (-54.33%)
Mutual labels:  tilemap, hexagonal
tilemap-studio
A tilemap editor for Game Boy, Color, Advance, DS, and SNES projects. Written in C++ with FLTK.
Stars: ✭ 247 (+94.49%)
Mutual labels:  tilemap
download.unity.com
Unity Download http://unity3d.com/unity/download/archive
Stars: ✭ 90 (-29.13%)
Mutual labels:  unity-editor
HotUpdateSolution
Hot update solution for unity3d
Stars: ✭ 30 (-76.38%)
Mutual labels:  unity-editor
textyle
Web tilemap editor for 2D games built using React JS, WebGL and Rust (WASM).
Stars: ✭ 87 (-31.5%)
Mutual labels:  tilemap
unity-forge-property-drawers
Custom propery drawers to ease fields value management in Unity editor.
Stars: ✭ 36 (-71.65%)
Mutual labels:  unity-editor
project-settings-toolbar
A tool bar that can open each item of Project Settings.
Stars: ✭ 28 (-77.95%)
Mutual labels:  unity-editor
awesome-unity
A curated list of awesome Unity games! 🎮
Stars: ✭ 346 (+172.44%)
Mutual labels:  unity-editor
WorldCreatorAssistant
Unity Editor extension for automating VRChat world project package management
Stars: ✭ 133 (+4.72%)
Mutual labels:  unity-editor
Unity-IMGUI-TreeView
Simple Tree View implementation for IMGUI (Editor GUI) in Unity. Includes a special type for working with asset paths, but base data structure and view can be easily extended to support anything.
Stars: ✭ 73 (-42.52%)
Mutual labels:  unity-editor
1 First Steps
Setup Unity and Visual Studio on Mac and PC. Use Unity's editor to position, rotate and scale game objects. Understand prefabs. Write very basic code, and use Unity's Console. http://gdev.tv/cu2github (REF: FS_CU2)
Stars: ✭ 23 (-81.89%)
Mutual labels:  unity-editor
scripts-manager-unity3d
📄 Gives the list of scripts in the current scene with gameobject reference.
Stars: ✭ 52 (-59.06%)
Mutual labels:  unity-editor
unity-puzzlesystem-asset
The asset for the Unity Engine that allows to quickly create customisable puzzles.
Stars: ✭ 21 (-83.46%)
Mutual labels:  unity-editor
LMS.Version
Super simple auto build version tool
Stars: ✭ 40 (-68.5%)
Mutual labels:  unity-editor
GizmoExtensions
Utility class(es) that extend Unity's Gizmos
Stars: ✭ 100 (-21.26%)
Mutual labels:  unity-editor
UniProjectWindowMenuCustomizer
Editor extension that allows you to customize the menu that appears when you right-click on Project view.
Stars: ✭ 18 (-85.83%)
Mutual labels:  unity-editor
Unity-SerializeReferenceExtensions
Provide popup to specify the type of the field serialized by the [SerializeReference] attribute in the inspector.
Stars: ✭ 255 (+100.79%)
Mutual labels:  unity-editor
UnityNativeTool
Allows to unload native plugins in Unity3d editor
Stars: ✭ 147 (+15.75%)
Mutual labels:  unity-editor
ktor-hexagonal-benchmark
a experimental ktor application using hexagonal architecture
Stars: ✭ 32 (-74.8%)
Mutual labels:  hexagonal
unity-now
▲ Vercel Now plugin for Unity. Deploy WebGL builds with ease
Stars: ✭ 21 (-83.46%)
Mutual labels:  unity-editor

Unity hex tile editor

A hex-based tile editor for Unity. Built for Bees Won't Exist

Imgur

Check out my YouTube playlist for some examples of it in action.

To test the hex tile system without importing into your own project, just open this Unity project and load up Example Content/Example scene.unity.

If you're interested in getting involved feel free to check out the roadmap on Trello, or submit a pull request.

Contents

Getting started

Importing into your own project

To get started, simply copy the whole Assets/Code/HexTiles folder as well as Assets/Plugins/Fluent-State-Machine.dll into your Unity project. This requires Unity 5.3 or later and has been tested on up to Unity 2018.1.0. Note that Fluent-State-Machine is only required by the editor and does not need to be included in your builds.

Basic use

Creating a tile map

To create a new hex tile map, go to the GameObject menu or right click anywhere in the Hierarchy window in Unity and select Hex tile map from the list of types of objects to create. This will add a new object named "Hex tile map" to your scene. Select it and you will see the inspector for the tile editor which should look something like this:

Default inspector

The tile map editor works in a similar way to Unity's terrain editor - you have several different tools for interacting with the map, and these are accessible from the toolbar at the top of the editor. Click the plus icon to go into tile painting mode and create some tiles.

Tile painting

Tile paint mode

This is the main tool you will use to create tile maps. Moving the cursor over the scene view will show a blue outline where tiles will appear, and you can click and drag to place tiles.

Painting a tile

Adjusting the brush size allows you to paint over a wider area.

Brush size of 4

Adjusting the offset height allows you to click and have tiles appear at an offset to the mouse position. This can be useful when you want to create ledges between tiles at multiple levels. In offset painting mode, the paint height you selects represents the position in the hex map that should be selected by the mouse cursor and is highlighted in white. The position where a new tile will actually appear when you click is stil highlighted blue, but will be offset by the height offset value from the main paint height.

Offset height

In all these cases, you only ever need to paint the tops of tiles. Side pieces will be generated automatically when two tiles at different heights are placed next to each other.

Selecting and inspecting existing tiles

Once you have some tiles in your tile map, you can use the select mode to inspect their properties. This is accessible via the button that looks like a mouse cursor.

Select mode

Click on tiles to inspect their properties. This is useful for checking the elevation of an existing tile before painting other tiles next to it, and you can individually change materials on tiles by selecting them and choosing a different material as well.

Painting materials on existing tiles

Material paint mode can be used to easily and quickly paint different materials onto existing tiles without having to place new tiles over them. Click or drag on an existing tile in the scene view to change its material.

Material paint

Clicking Apply to all tiles will apply the currently selected material to all tiles in the tile map.

Erasing tiles

Erase mode can be used to delete existing tiles. This works in a similar way to Material paint and Paint tiles modes, as you click or drag the cursor on existing tiles to remove them. Like Material paint and Paint tiles, Erase also supports multiple brush sizes for quickly removing large areas of tiles.

Erase mode

Settings and other options

More options are available in the Settings tab, accessible via the cog icon.

Settings

  • Show tile positions draws text in the scene view above each tile with its position. This was originally intended as a debugging feature but can be useful when setting up more complex tile maps. Not recommended for large maps as it kills performance in the Unity Editor.
  • Tile size sets how wide each tile should be. It is recommended to change this rather than just scaling the transform of the object containing the whole map.
  • Chunk size sets how many tiles should be combined into each mesh for performance. This can be tweaked to work out the best value for your project. Note that this does not update until you click Apply.
  • Re-generate all tile geometry deletes all tile meshes and re-generates them using saved information about their positions. This can be useful to undo changes that have been manually applied to the generated chunk objects, or reset the scene if something breaks due to an error.
  • Clear all tiles deletes all tiles in the current tile map. This is a destructive operation and should be used with caution.

Setting up materials for use with hex tile maps.

See Assets/Example Content/Textures for some examples for how to set up a texture for use with a tile map. Tops of tiles and side pieces are stored on the same texture atlas so that a map can be drawn in a single batch, with the top pieces taking up the top half of the texture and the side pieces taking up the lower half. See the Test tileset image for reference:

Test tileset

The area for the top pieces contains 4x3 tiles, which are numbered in the test tileset. Note that these are slightly stretched vertically, which is necessary to make them fit into a square texture.

The area for the side pieces is split into an upper and a lower half. The top half is only used once and the lower half is looped forever. This is useful for times when you might want the texture from the top to spill over onto the sides for a short while (for example, the grass texture in OutDoorTileset.png). Each hex has 6 sides and these are split up evenly across the texture.

Tips and best practices

  • Selecting a tile map overrides the default Unity left-click behaviour so you won't be able to click on other objects to select them after selecting a hex tile map. This is intentional, and you can go back to selecting objects normally by clicking on something else in the scene hierarchy window.
  • In some cases you may want to modify the tiles that have been generated by this plugin. In those cases it is best to remove the HexTileMap script from the parent object so that no one later on accidentally paints more tiles and causes that chunk to be re-generated, removing any changes that may have been made since then.
  • It is often useful to have several different hex tile maps in the same scene for tiles that are meant to be independent.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].