Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

CanvasRenderer.SetMaterial

Switch to Manual
public function SetMaterial(material: Material, texture: Texture): void;

Parameters

material Material for rendering.
texture Material texture overide.

Description

Set the material for UIRenderer. If a texture is specified then it will be used as the 'MainTex' instead of the material's 'MainTex'.