• Manual
  • Scripting API
  • Asset Store
  • TycoonTerrain.Previewers
  • ToolPreviewerBase<T>
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 ToolPreviewerBase<T>

    Inheritance
    Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    ToolPreviewerBase<T>
    BuildingToolPreviewer
    TerrainPainterPreviewer
    TerrainSelectionPreviewer
    Namespace: TycoonTerrain.Previewers
    Assembly: TycoonTerrainAssembly.dll
    Syntax
    public abstract class ToolPreviewerBase<T> : MonoBehaviour where T : ToolBase
    Type Parameters
    Name Description
    T

    Properties

    Tool

    Gets the tool for this previewer.

    Declaration
    public T Tool { get; }
    Property Value
    Type Description
    T

    Methods

    Awake()

    Declaration
    protected virtual void Awake()

    LateUpdate()

    Declaration
    protected virtual void LateUpdate()

    OnDisable()

    Declaration
    protected virtual void OnDisable()

    OnEnable()

    Declaration
    protected virtual void OnEnable()

    OnToolDisabled()

    Called when the tool for this previewer gets disabled.

    Declaration
    protected virtual void OnToolDisabled()

    OnToolEnabled()

    Called when the tool for this previewer gets enabled.

    Declaration
    protected virtual void OnToolEnabled()

    RenderMeshOnSelectedMap(Mesh, Matrix4x4, Material, Int32)

    Renders a mesh on the selected map at a certain map position, scale and rotation.

    Declaration
    protected void RenderMeshOnSelectedMap(Mesh mesh, Matrix4x4 matrix, Material material, int layer)
    Parameters
    Type Name Description
    UnityEngine.Mesh mesh

    The mesh to render.

    UnityEngine.Matrix4x4 matrix

    The matrix that defines the position, rotation and scale in map space.

    UnityEngine.Material material

    The material to render with.

    Int32 layer

    The layer to render to.

    RenderOverlayOnSelectedMap(SurfaceOverlayMesh, Material, Int32)

    Renders an overlay on the currently selected TycoonTileMap of the tool.

    Declaration
    protected void RenderOverlayOnSelectedMap(SurfaceOverlayMesh overlay, Material material, int layer)
    Parameters
    Type Name Description
    SurfaceOverlayMesh overlay

    The overlay mesh to render.

    UnityEngine.Material material

    The material to render with.

    Int32 layer

    The layer to render to.

    RenderPreview()

    Renders the preview.

    Declaration
    protected abstract void RenderPreview()

    RenderPreviewMeshOnSelectedMap(PreviewMeshes, Matrix4x4, Material, Int32)

    Renders a preview mesh on the selected map at a certain map position, scale and rotation.

    Declaration
    protected void RenderPreviewMeshOnSelectedMap(PreviewMeshes mesh, Matrix4x4 matrix, Material material, int layer)
    Parameters
    Type Name Description
    PreviewMeshes mesh

    The preview mesh to render.

    UnityEngine.Matrix4x4 matrix

    The matrix that defines the position, rotation and scale in map space.

    UnityEngine.Material material

    The material to render with.

    Int32 layer

    The layer to render to.

    RenderPreviewMeshOnSelectedMap(PreviewMeshes, Vector3, Quaternion, Vector3, Material, Int32)

    Renders a preview mesh on the selected map at a certain map position, scale and rotation.

    Declaration
    protected void RenderPreviewMeshOnSelectedMap(PreviewMeshes mesh, Vector3 mapPosition, Quaternion rotation, Vector3 scale, Material material, int layer)
    Parameters
    Type Name Description
    PreviewMeshes mesh

    The preview mesh to render.

    UnityEngine.Vector3 mapPosition

    The position in map space.

    UnityEngine.Quaternion rotation

    The rotation in map space.

    UnityEngine.Vector3 scale

    The scale in map space.

    UnityEngine.Material material

    The material to render with.

    Int32 layer

    The layer to render to.

    In This Article
    • Properties
      • Tool
    • Methods
      • Awake()
      • LateUpdate()
      • OnDisable()
      • OnEnable()
      • OnToolDisabled()
      • OnToolEnabled()
      • RenderMeshOnSelectedMap(Mesh, Matrix4x4, Material, Int32)
      • RenderOverlayOnSelectedMap(SurfaceOverlayMesh, Material, Int32)
      • RenderPreview()
      • RenderPreviewMeshOnSelectedMap(PreviewMeshes, Matrix4x4, Material, Int32)
      • RenderPreviewMeshOnSelectedMap(PreviewMeshes, Vector3, Quaternion, Vector3, Material, Int32)
    Back to top Tycoon Tile documentation