Rotorz Tile System Icon
Rotorz Tile System for Unity
API Reference
Available on the Unity Asset Store
TOC

Tileset Class

A tileset allows tileset brushes to paint procedural or non-procedural tiles using an atlas texture that contains multiple tiles.
public class Tileset : ScriptableObject, IDesignableObject, 
	IHistoryObject, ITilesetMetrics
public class Tileset extends ScriptableObject
	implements IDesignableObject, IHistoryObject, ITilesetMetrics

Refer to Tilesets section of user guide for further information about tilesets.

Methods

CalculateTexCoords(Int32)
Calculate texture coordinates for use with GUI.DrawTextureWithTexCoords.
CreateStandaloneTileMesh(Int32)
Create new two-triangle plane mesh to represent tile. Mesh is not maintained within tileset and should be manually destroyed when nolonger needed.
GetTileMesh(Int32)
Gets non-procedural mesh for tile.
Initialize(Material, Texture2D, ITilesetMetrics)
Initialize tileset for first time.
PrepareTileMesh(Int32)
Prepares mesh for specific non-procedural tile if it has not already been prepared. Non-procedural meshes are typically prepared and stored within tileset asset.
RefreshTileMesh(Int32)
Refresh mesh of non-procedural tile if it already exists, otherwise create it.
SetMetricsFrom(ITilesetMetrics)
Set metrics of tileset.
UpdateStandaloneTileMesh(Int32, Mesh)
Update vertices, uvs and triangles of existing standalone tile mesh.
UpdateStandaloneTileMeshUVs(Int32, Mesh)
Just update UV coordinates of existing standalone tile mesh.

Fields

procedural
Indicates if tiles should be generated procedurally or whether to create a game object for each tile.

Properties

AtlasMaterial
Gets or sets atlas material.
AtlasTexture
Gets or sets atlas texture.
BorderSize
Gets size of tile border in pixels.
BorderU
Gets size of tile border on U-axis in UV space.
BorderV
Gets size of tile border on V-axis in UV space.
Columns
Gets number of columns of tiles in atlas texture.
Delta
Gets delta value.
DeltaU
Gets delta for U-axis.
DeltaV
Gets delta for V-axis.
DesignableType
Gets user friendly name of designable type.
OriginalAtlasHeight
Gets height of original texture asset.
OriginalAtlasWidth
Gets width of original texture asset.
Rows
Gets number of rows of tiles in atlas texture.
TileHeight
Gets height of tile in pixels.
TileHeightUV
Gets height of tile in UV space.
TileIncrementU
Gets offset to next tile on U-axis of UV coordinates.
TileIncrementV
Gets offset to next tile on V-axis of UV coordinates.
TileIncrementX
Gets offset in pixels to next tile on X-axis of atlas texture.
TileIncrementY
Gets offset in pixels to next tile on Y-axis of atlas texture.
TileWidth
Gets width of tile in pixels.
TileWidthUV
Gets width of tile in UV space.

Remarks

Tile atlases can include additional border area around each tile reduce the effects of bleeding that is caused by texture filtering. Alternatively you can choose to inset UVs by a small fraction of a pixel (delta). Whilst specifying a delta is not as effective as adding borders around tiles, a delta does not require manual changes to be made to the atlas artwork.

Inheritance Hierarchy

System.Object
  Object
    ScriptableObject
      Rotorz.Tile.Tileset
        Rotorz.Tile.AutotileTileset

See Also

Reference