• Manual
  • Scripting API
  • Asset Store
  • TycoonTerrain.Core
  • ConstructableDefinition
Search Results for

    Show / Hide Table of Contents
    • TycoonTerrain.Components
      • TycoonTileRendererBase
    • TycoonTerrain.Core
      • BoundsContainer
      • BoundsReservationRegister
      • CallbackHandle
      • CallbacksRegister
      • CardinalDirection
      • ChunkSet
      • ConstructableDefinition
      • CornerIndex
      • Extensions
      • IChunkListener
      • IntBound
      • LandTile
      • OnBoundsChangeCallback
      • PlacementValidResult
      • SurfaceOverlayMesh
      • TerrainGrid
      • TerrainModifiedEvent
      • TerrainSelection
      • TerrainTypeCollectionAsset
      • TerrainTypeDefinition
      • TerrainTypeTable
      • TileCorner
      • TileHandle
      • TilePosition
      • TileType
      • TycoonTileMap
      • TycoonTileRaycastHit
    • TycoonTerrain.Core.Generation
      • TerrainGenerationJob
    • TycoonTerrain.Core.Rendering
      • ChunkMesh
      • IMesh
      • NativeMeshData
      • RenderTerrainCliffChunkJob
      • RenderTerrainSurfaceChunkJob
      • RenderWaterChunkJob
      • RenderWaterCliffChunkJob
      • SubMeshTriangle
    • TycoonTerrain.Core.TerrainOperations
      • ClearWaterBodyOperation
      • CopyHeightMapOperation
      • CreateWaterBodyFloodOperation
      • DecreaseHeightCliffOperation
      • DecreaseHeightCorner
      • DecreaseHeightSmoothConnectedOperation
      • GetTilesInWaterBody
      • IncreaseHeightCliffOperation
      • IncreaseHeightCorner
      • IncreaseHeightSmoothConnectedOperation
      • ITerrainOperation
      • MaxHeightSmooth
      • OperationContext
      • OperationResult
      • SetHeightOperation
      • SetTileTypeInBoundsOperation
      • SetWaterLevelOperation
    • TycoonTerrain.Previewers
      • BuildingToolPreviewer
      • PreviewMeshes
      • TerrainPainterPreviewer
      • TerrainSelectionPreviewer
      • ToolPreviewerBase<T>
    • TycoonTerrain.Tools
      • BuildingTool
      • PainterTool
      • SceneryTool
      • SelectionToolBase
      • SnappingMode
      • TerraformingTool
      • ToolBase
      • WaterTool

    Class ConstructableDefinition

    Defines a constructable object for Tycoon Tile terrain.

    Inheritance
    Object
    UnityEngine.Object
    UnityEngine.ScriptableObject
    ConstructableDefinition
    Namespace: TycoonTerrain.Core
    Assembly: TycoonTerrainAssembly.dll
    Syntax
    [CreateAssetMenu(menuName = "Tycoon Tile/Constructable Definition")]
    public class ConstructableDefinition : ScriptableObject

    Fields

    Length

    The length of the constructable.

    Declaration
    public int Length
    Field Value
    Type Description
    Int32

    Prefab

    The UnityEngine.GameObject to instantiate when a build is initiated.

    Declaration
    public GameObject Prefab
    Field Value
    Type Description
    UnityEngine.GameObject

    Width

    The width of the constructable.

    Declaration
    public int Width
    Field Value
    Type Description
    Int32

    Properties

    Size

    The size of the constructable in both directions.

    Declaration
    public int2 Size { get; }
    Property Value
    Type Description
    Unity.Mathematics.int2

    Methods

    CheckPlacement(TerrainSelection)

    Determines whether the [the specified terrain selection] [is a valid placement] for this building. Override this function to provide custom placement rules.

    Declaration
    public virtual PlacementValidResult CheckPlacement(TerrainSelection selection)
    Parameters
    Type Name Description
    TerrainSelection selection

    The terrain selection.

    Returns
    Type Description
    PlacementValidResult

    true if [the specified terrain selection] [is a valid placement]; otherwise, false.

    GetFootPrint(CardinalDirection)

    Gets the footprint size for a given rotation.

    Declaration
    public int2 GetFootPrint(CardinalDirection rotation)
    Parameters
    Type Name Description
    CardinalDirection rotation

    The rotation.

    Returns
    Type Description
    Unity.Mathematics.int2

    The size of the construble in a given rotation.

    GetRotation(CardinalDirection)

    Gets the rotation quaternion for a given rotation direction.

    Declaration
    public Quaternion GetRotation(CardinalDirection rotation)
    Parameters
    Type Name Description
    CardinalDirection rotation

    The rotation direction

    Returns
    Type Description
    UnityEngine.Quaternion

    The rotation quaternion for a given rotation direction.

    See Also

    UnityEngine.ScriptableObject
    In This Article
    • Fields
      • Length
      • Prefab
      • Width
    • Properties
      • Size
    • Methods
      • CheckPlacement(TerrainSelection)
      • GetFootPrint(CardinalDirection)
      • GetRotation(CardinalDirection)
    • See Also
    Back to top Tycoon Tile documentation