Class TerrainTypeCollectionAsset
This asset is responsible for containing all terrain type definitions and their respective materials.
Namespace: TycoonTerrain.Core
Assembly: TycoonTerrainAssembly.dll
Syntax
[CreateAssetMenu(menuName = "Tycoon Tile/Create Terrain Type Collection", order = 300)]
public class TerrainTypeCollectionAsset : ScriptableObject
Fields
Definitions
The tile type definitions.
Declaration
[Tooltip("The list of terrain type definitions. You must include at least one definition.")]
public TerrainTypeDefinition[] Definitions
Field Value
Type | Description |
---|---|
Terrain |
The tile type definitions. |
WaterCliffMaterial
The water cliff material
Declaration
[Tooltip("The material that should be used to render the cliffs of water tiles.")]
public Material WaterCliffMaterial
Field Value
Type | Description |
---|---|
Unity |
The water cliff material. |
WaterMaterial
The water surface material.
Declaration
[Tooltip("The material that should be used to render water surfaces.")]
public Material WaterMaterial
Field Value
Type | Description |
---|---|
Unity |
The water surface material. |
Properties
HasDefinitions
Gets whether this asset includes any valid terrain type definitions.
Declaration
public bool HasDefinitions { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Methods
GetCliffMaterialForTileType(TileType)
Gets the material that should be used to render the cliff for a specific terrain type.
Declaration
public Material GetCliffMaterialForTileType(TileType tileType)
Parameters
Type | Name | Description |
---|---|---|
Tile |
tileType | The tile type. |
Returns
Type | Description |
---|---|
Unity |
The material to use for rendering cliffs of the given |
GetSurfaceMaterialForTileType(TileType)
Gets the material that should be used to render the surface for a specific terrain type.
Declaration
public Material GetSurfaceMaterialForTileType(TileType tileType)
Parameters
Type | Name | Description |
---|---|---|
Tile |
tileType | The tile type. |
Returns
Type | Description |
---|---|
Unity |
The material to use for rendering surfaces of the given |
GetTileTypeByDefinition(TerrainTypeDefinition)
Gets a Tile
Declaration
public TileType GetTileTypeByDefinition(TerrainTypeDefinition definition)
Parameters
Type | Name | Description |
---|---|---|
Terrain |
definition | The tile type definition. |
Returns
Type | Description |
---|---|
Tile |
The Tile |
GetTileTypeByName(String)
Gets a Tile
Declaration
public TileType GetTileTypeByName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the tile type definition. |