ドキュメント

Unity Engine

Unity Engine

SetMaterial

Set the material for the canvas renderer. If a texture is specified then it will be used as the 'MainTex' instead of the material's 'MainTex'. Additional Resources: CanvasRenderer.materialCount, CanvasRenderer.SetTexture.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.UIModule

SetMaterial(Material, int)

Set the material for the canvas renderer. If a texture is specified then it will be used as the 'MainTex' instead of the material's 'MainTex'. Additional Resources: CanvasRenderer.materialCount, CanvasRenderer.SetTexture.
public void SetMaterial(Material material, int index)

Parameters

material

Material for rendering.

index

Material index.

SetMaterial(Material, Texture)

Set the material for the canvas renderer. If a texture is specified then it will be used as the 'MainTex' instead of the material's 'MainTex'. Additional Resources: CanvasRenderer.materialCount, CanvasRenderer.SetTexture.
public void SetMaterial(Material material, Texture texture)

Parameters

material

Material for rendering.

texture

Material texture overide.