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

    The base class that any Tycoon Tile renderer should implement. The base class is responsible for subscribing to map events, rendering chunks and keeping track of which chunks need updating.

    Inheritance
    Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    TycoonTileRendererBase
    Implements
    IChunkListener
    Namespace: TycoonTerrain.Components
    Assembly: TycoonTerrainAssembly.dll
    Syntax
    [RequireComponent(typeof(TycoonTileMap))]
    public abstract class TycoonTileRendererBase : MonoBehaviour, IChunkListener

    Fields

    CastShadows

    The cast shadows mode.

    Declaration
    public ShadowCastingMode CastShadows
    Field Value
    Type Description
    UnityEngine.Rendering.ShadowCastingMode

    ReceiveShadows

    Wether the terrain meshes receive shadows.

    Declaration
    public bool ReceiveShadows
    Field Value
    Type Description
    Boolean

    terrain

    Holds a reference to the terrain component.

    Declaration
    protected TycoonTileMap terrain
    Field Value
    Type Description
    TycoonTileMap

    TerrainTypes

    The terrain types collection.

    Declaration
    public TerrainTypeCollectionAsset TerrainTypes
    Field Value
    Type Description
    TerrainTypeCollectionAsset

    Methods

    OnUpdateChunks(TycoonTileMap, ref ChunkSet)

    Gets called after completing all operations for this frame. Meshes should be updated in this scope.

    Declaration
    public void OnUpdateChunks(TycoonTileMap terrain, ref ChunkSet dirtyChunks)
    Parameters
    Type Name Description
    TycoonTileMap terrain

    The terrain

    ChunkSet dirtyChunks

    UpdateChunkMeshes(IEnumerable<int2>, IDictionary<int2, IMesh>)

    The method to implement that defines what chunks will look like. Will be called when any chunk has been modified this frame.

    Declaration
    protected abstract void UpdateChunkMeshes(IEnumerable<int2> chunksToUpdate, IDictionary<int2, IMesh> meshes)
    Parameters
    Type Name Description
    IEnumerable<Unity.Mathematics.int2> chunksToUpdate

    The chunk positions that need updating.

    IDictionary<Unity.Mathematics.int2, IMesh> meshes

    The collection of meshes for each chunk position.

    Implements

    IChunkListener
    In This Article
    • Fields
      • CastShadows
      • ReceiveShadows
      • terrain
      • TerrainTypes
    • Methods
      • OnUpdateChunks(TycoonTileMap, ref ChunkSet)
      • UpdateChunkMeshes(IEnumerable<int2>, IDictionary<int2, IMesh>)
    • Implements
    Back to top Tycoon Tile documentation