• Manual
  • Scripting API
  • Asset Store
  • TycoonTerrain.Tools
  • BuildingTool
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 BuildingTool

    This is the terraforming tool. This class is responsible for scheduling terrain modifications based on selection changes and user input.

    Inheritance
    Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    ToolBase
    SelectionToolBase
    BuildingTool
    Inherited Members
    SelectionToolBase.Selection
    SelectionToolBase.SelectionChangedEvent
    SelectionToolBase.OnSelectionChanged(TerrainSelection)
    ToolBase.IsMouseOverUserInterface
    ToolBase.IsMouseOverTerrain
    ToolBase.Raycaster
    ToolBase.OnToolEnabledEvent
    ToolBase.OnToolDisabledEvent
    Namespace: TycoonTerrain.Tools
    Assembly: TycoonTerrainAssembly.dll
    Syntax
    [DisallowMultipleComponent]
    [AddComponentMenu("Tycoon Tile/Tools/Building Tool")]
    public class BuildingTool : SelectionToolBase

    Fields

    OnBuildDeniedEvent

    Declaration
    [Header("Events")]
    public UnityEvent OnBuildDeniedEvent
    Field Value
    Type Description
    UnityEngine.Events.UnityEvent

    OnBuildEvent

    Declaration
    public UnityEvent OnBuildEvent
    Field Value
    Type Description
    UnityEngine.Events.UnityEvent

    Prefab

    The construction prefab.

    Declaration
    public ConstructableDefinition Prefab
    Field Value
    Type Description
    ConstructableDefinition

    Properties

    IsPlacementValid

    Indicates whether the current terrain selection is valid for building placement.

    Declaration
    public bool IsPlacementValid { get; }
    Property Value
    Type Description
    Boolean

    Rotation

    Gets or sets the selected building rotation.

    Declaration
    public CardinalDirection Rotation { get; set; }
    Property Value
    Type Description
    CardinalDirection

    SelectionCenterHeightScaled

    Declaration
    public Vector3 SelectionCenterHeightScaled { get; }
    Property Value
    Type Description
    UnityEngine.Vector3

    SelectionCenterWorldPosition

    Declaration
    public Vector3 SelectionCenterWorldPosition { get; }
    Property Value
    Type Description
    UnityEngine.Vector3

    Methods

    Awake()

    Declaration
    protected override void Awake()
    Overrides
    ToolBase.Awake()

    CheckPlacement()

    Checks the placement validity.

    Declaration
    public PlacementValidResult CheckPlacement()
    Returns
    Type Description
    PlacementValidResult

    A valid placement result if placement is valid. Otherwise, an invalid placement result with a reason.

    OnDisable()

    Declaration
    protected override void OnDisable()
    Overrides
    SelectionToolBase.OnDisable()

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    SelectionToolBase.OnEnable()
    In This Article
    • Fields
      • OnBuildDeniedEvent
      • OnBuildEvent
      • Prefab
    • Properties
      • IsPlacementValid
      • Rotation
      • SelectionCenterHeightScaled
      • SelectionCenterWorldPosition
    • Methods
      • Awake()
      • CheckPlacement()
      • OnDisable()
      • OnEnable()
    Back to top Tycoon Tile documentation