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 |
---|---|
TerrainTypeDefinition[] | 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 |
---|---|
UnityEngine.Material | 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 |
---|---|
UnityEngine.Material | 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 |
---|---|---|
TileType | tileType | The tile type. |
Returns
Type | Description |
---|---|
UnityEngine.Material | 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 |
---|---|---|
TileType | tileType | The tile type. |
Returns
Type | Description |
---|---|
UnityEngine.Material | The material to use for rendering surfaces of the given |
GetTileTypeByDefinition(TerrainTypeDefinition)
Gets a TileType instance that represents the given TerrainTypeDefinition. It is recommended to cache the result of this method for use in terrain operations etc.
Declaration
public TileType GetTileTypeByDefinition(TerrainTypeDefinition definition)
Parameters
Type | Name | Description |
---|---|---|
TerrainTypeDefinition | definition | The tile type definition. |
Returns
Type | Description |
---|---|
TileType | The TileType instance that refers to the terrain type definition asset |
GetTileTypeByName(String)
Gets a TileType instance that represents the tile type definition with the given name. It is recommended to cache the result of this method for use in terrain operations etc.
Declaration
public TileType GetTileTypeByName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the tile type definition. |
Returns
Type | Description |
---|---|
TileType | The TileType instance that refers to the terrain type definition asset with name |