Search Results for

    Show / Hide Table of Contents

    Class GameMaterialIDRegistry

    Unityのから共通ライブラリのを作るにあたって、 具体的な見た目をC++に送るのではなく、UnityマテリアルにIDを割り振ってIDのみをC++のに記録する変換モードです。 用途はモデル修正で、変換後にUnityマテリアルIDをもとにマテリアルを復元するために使います。 ここでいうマテリアルIDとは、GameMaterialsのインデックスを指します。

    Inheritance
    System.Object
    GameMaterialIDRegistry
    Implements
    IUnityMeshToDllSubMeshConverter
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: PLATEAU.CityExport.ModelConvert.SubMeshConvert
    Assembly: cs.temp.dll.dll
    Syntax
    public class GameMaterialIDRegistry : IUnityMeshToDllSubMeshConverter

    Properties

    GameMaterials

    Declaration
    public List<Material> GameMaterials { get; }
    Property Value
    Type Description
    List<Material>

    Methods

    Convert(Mesh, Renderer)

    Declaration
    public List<SubMesh> Convert(Mesh unityMesh, Renderer renderer)
    Parameters
    Type Name Description
    Mesh unityMesh
    Renderer renderer
    Returns
    Type Description
    List<SubMesh>

    SendMaterialIDToSubMesh(SubMesh, List<Material>, Material)

    与えられたマテリアルが記録にあればそのIDを送り、なければ新たに記録して送ります。

    Declaration
    public static void SendMaterialIDToSubMesh(SubMesh dllSubMesh, List<Material> gameMaterials, Material material)
    Parameters
    Type Name Description
    SubMesh dllSubMesh
    List<Material> gameMaterials
    Material material

    TryAddMaterial(Material, out Int32)

    マテリアルが記録になければ追加します。そのマテリアルに割り当てられたIDをout引数で返します。

    Declaration
    public bool TryAddMaterial(Material mat, out int outMatID)
    Parameters
    Type Name Description
    Material mat
    System.Int32 outMatID
    Returns
    Type Description
    System.Boolean

    Implements

    IUnityMeshToDllSubMeshConverter
    In This Article
    Back to top PLATEAU SDK for Unity