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

    Struct TerrainSelection

    Represents a tile selection of the tycoon tile terrain. This is used with the included tools and previewers.

    Namespace: TycoonTerrain.Core
    Assembly: TycoonTerrainAssembly.dll
    Syntax
    public struct TerrainSelection

    Fields

    Terrain

    The terrain that this selection refers to.

    Declaration
    public TycoonTileMap Terrain
    Field Value
    Type Description
    TycoonTileMap

    The selected map instance.

    Properties

    Bounds

    Gets the selected bounds that is within the terrain area.

    Declaration
    public IntBound Bounds { get; }
    Property Value
    Type Description
    IntBound

    The bounds.

    CenterPosition

    Gets the center position.

    Declaration
    public float2 CenterPosition { get; }
    Property Value
    Type Description
    Unity.Mathematics.float2

    The center position.

    HasSelection

    Whether this selection is valid.

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

    true if the there is a valid terrain selection; otherwise, false.

    IsSelectionWithinTerrainArea

    Indicates whether the terrain selection is completely within the terrain bounds. False otherwise.

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

    true if the entire terrain selection is within the map bounds; otherwise, false.

    IsSingleCornerSelection

    Gets a value indicating whether this selection is a single tile corner.

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

    true if this this selection is a single tile corner; otherwise, false.

    Size

    The selection size.

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

    The selection size.

    TileCorner

    Gets the selected tile corner. Should only be called when IsSingleCornerSelection is true.

    Declaration
    public TileCorner TileCorner { get; }
    Property Value
    Type Description
    TileCorner

    The tile corner.

    Tiles

    Enumerates through the tiles within the selection.

    Declaration
    public IEnumerable<TileHandle> Tiles { get; }
    Property Value
    Type Description
    IEnumerable<TileHandle>

    The tiles within this selection.

    UnconstrainedBounds

    Gets the selected bounds. These bounds may be located (partially) outside the valid terrain area.

    Declaration
    public IntBound UnconstrainedBounds { get; }
    Property Value
    Type Description
    IntBound

    The unconstrained bounds.

    Methods

    Clear()

    Clears the selection.

    Declaration
    public void Clear()

    SelectTileBounds(IntBound)

    Sets this terrain selection a rectangular selection of multiple tiles.

    Declaration
    public void SelectTileBounds(IntBound bounds)
    Parameters
    Type Name Description
    IntBound bounds

    The bounds of the tiles that should be selected.

    SelectTileCorner(TileHandle, CornerIndex)

    Sets this terrain selection to a single tile corner.

    Declaration
    public void SelectTileCorner(TileHandle tile, CornerIndex tileCorner)
    Parameters
    Type Name Description
    TileHandle tile

    The tile of which the corner will be selected.

    CornerIndex tileCorner

    The corner of the tile that will be selected.

    In This Article
    • Fields
      • Terrain
    • Properties
      • Bounds
      • CenterPosition
      • HasSelection
      • IsSelectionWithinTerrainArea
      • IsSingleCornerSelection
      • Size
      • TileCorner
      • Tiles
      • UnconstrainedBounds
    • Methods
      • Clear()
      • SelectTileBounds(IntBound)
      • SelectTileCorner(TileHandle, CornerIndex)
    Back to top Tycoon Tile documentation