文档

Unity Engine

Unity Engine

OnAssignMaterialModel(Material, Renderer)

Feeds a source material.
阅读时间1 分钟最后更新于 1 个月前

Definition

OnAssignMaterialModel()

public void OnAssignMaterialModel(Material material, Renderer renderer)

Parameters

material


renderer

Remarks

The returned material will be assigned to the renderer. If you return null, Unity will use its default material finding / generation method to assign a material. The sourceMaterial is generated directly from the model before importing and will be destroyed immediately after OnAssignMaterial.