Search Results for

    Show / Hide Table of Contents

    Struct NativeMeshData

    Structure used by rendering jobs to facilitate mesh building in the Unity Job System on background threads.

    Namespace: TycoonTerrain.Core.Rendering
    Assembly: TycoonTerrainAssembly.dll
    Syntax
    public struct NativeMeshData

    Constructors

    NativeMeshData(Allocator)

    Declaration
    public NativeMeshData(Allocator allocator)
    Parameters
    Type Name Description
    Unity.Collections.Allocator allocator

    NativeMeshData(NativeList<SubMeshTriangle>, NativeList<float3>, NativeList<float2>)

    Declaration
    public NativeMeshData(NativeList<SubMeshTriangle> indices, NativeList<float3> verts, NativeList<float2> uv)
    Parameters
    Type Name Description
    Unity.Collections.NativeList<SubMeshTriangle> indices
    Unity.Collections.NativeList<Unity.Mathematics.float3> verts
    Unity.Collections.NativeList<Unity.Mathematics.float2> uv

    Fields

    indices

    Declaration
    public NativeList<SubMeshTriangle> indices
    Field Value
    Type Description
    Unity.Collections.NativeList<SubMeshTriangle>

    uvs

    Declaration
    public NativeList<float2> uvs
    Field Value
    Type Description
    Unity.Collections.NativeList<Unity.Mathematics.float2>

    vertices

    Declaration
    public NativeList<float3> vertices
    Field Value
    Type Description
    Unity.Collections.NativeList<Unity.Mathematics.float3>

    Methods

    CopyData(NativeMeshData, List<Vector3>, List<List<Int32>>, Dictionary<TileType, Int32>, List<Vector2>)

    Copies the data from the native mesh data to managed data arrays.

    Declaration
    public static void CopyData(NativeMeshData from, List<Vector3> vertices, List<List<int>> indices, Dictionary<TileType, int> terrainTypeMapping, List<Vector2> uvs)
    Parameters
    Type Name Description
    NativeMeshData from

    NativeMeshData instance to copy data from.

    List<UnityEngine.Vector3> vertices

    The destination vertices.

    List<List<Int32>> indices

    The destination indices.

    Dictionary<TileType, Int32> terrainTypeMapping

    The tile type to submesh mappings.

    List<Vector2> uvs

    The destination uvs.

    CopyData(NativeMeshData, List<Vector3>, List<Int32>, List<Vector2>)

    Copies the data from the native mesh data to managed data arrays.

    Declaration
    public static void CopyData(NativeMeshData from, List<Vector3> vertices, List<int> indices, List<Vector2> uvs)
    Parameters
    Type Name Description
    NativeMeshData from

    NativeMeshData instance to copy data from.

    List<UnityEngine.Vector3> vertices

    The destination vertices.

    List<Int32> indices

    The destination indices.

    List<Vector2> uvs

    The destination uvs.

    CopyIndices(NativeMeshData, List<List<Int32>>, Dictionary<TileType, Int32>)

    Declaration
    public static void CopyIndices(NativeMeshData from, List<List<int>> indices, Dictionary<TileType, int> mapping)
    Parameters
    Type Name Description
    NativeMeshData from
    List<List<Int32>> indices
    Dictionary<TileType, Int32> mapping

    CopyIndicesFlat(NativeMeshData, List<Int32>)

    Ignores terrain type info and copies the indices to a flat array

    Declaration
    public static void CopyIndicesFlat(NativeMeshData from, List<int> indices)
    Parameters
    Type Name Description
    NativeMeshData from

    The source native mesh data.

    List<Int32> indices

    The destination indices list.

    Dispose()

    Declaration
    public void Dispose()
    In This Article
    Back to top Tycoon Tile documentation