Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Interface ITerrainLayerFactory

    Defines a factory for creating terrain layer instances used in hex-based map systems.

    Namespace: Fwt.HexTerrains.Data
    Assembly: fwt.hexterrains.dll
    Syntax
    public interface ITerrainLayerFactory
    Remarks

    Implementations of this interface provide methods to create default or custom terrain layers. Use the generic method to instantiate a specific subclass of HexTerrainLayer when specialized behavior or data is required.

    Methods

    CreateTerrainLayer()

    Creates a new instance of a terrain layer for hex-based maps.

    Declaration
    HexTerrainLayer CreateTerrainLayer()
    Returns
    Type Description
    HexTerrainLayer

    A HexTerrainLayer representing the newly created terrain layer.

    CreateTerrainLayer<TTerrainLayer>()

    Creates a new terrain layer instance of the specified type, if possible.

    Declaration
    TTerrainLayer CreateTerrainLayer<TTerrainLayer>() where TTerrainLayer : HexTerrainLayer
    Returns
    Type Description
    TTerrainLayer

    An instance of TTargetLayer if the created terrain layer is of the specified type; otherwise, null.

    Type Parameters
    Name Description
    TTerrainLayer
    Remarks

    If the created terrain layer is not of the requested type, it is disposed and null is returned. This method may return null if no terrain layer can be created.

    Extension Methods

    HashExtensions.GetHashCode_RefType<TValue>(TValue, int)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    In this article
    Back to top Generated by DocFX