A material for CanvasItems.
    public class CanvasItemMaterial : Material

CanvasItemMaterials provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a ShaderMaterial to more fully customize a material’s interactions with a CanvasItem.

Inheritance Chain


    public CanvasItemMaterial()


    public BlendModeEnum BlendMode { get; set; }

The manner in which a material’s rendering is applied to underlying textures.

    public LightModeEnum LightMode { get; set; }

The manner in which material reacts to lighting.

    public bool ParticlesAnimation { get; set; }

    public int ParticlesAnimHFrames { get; set; }

    public bool ParticlesAnimLoop { get; set; }

    public int ParticlesAnimVFrames { get; set; }


    public BlendModeEnum GetBlendMode()

Getter for BlendMode

    public LightModeEnum GetLightMode()

Getter for LightMode

    public bool GetParticlesAnimation()

Getter for ParticlesAnimation

    public int GetParticlesAnimHFrames()

Getter for ParticlesAnimHFrames

    public bool GetParticlesAnimLoop()

Getter for ParticlesAnimLoop

    public int GetParticlesAnimVFrames()

Getter for ParticlesAnimVFrames

    public void SetBlendMode(BlendModeEnum blendMode)

Setter for BlendMode

    public void SetLightMode(LightModeEnum lightMode)

Setter for LightMode

    public void SetParticlesAnimation(bool particlesAnim)

Setter for ParticlesAnimation

    public void SetParticlesAnimHFrames(int frames)

Setter for ParticlesAnimHFrames

    public void SetParticlesAnimLoop(bool loop)

Setter for ParticlesAnimLoop

    public void SetParticlesAnimVFrames(int frames)

Setter for ParticlesAnimVFrames

Inner Types


Name Value Description
Mix 0 Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
Add 1 Additive blending mode.
Sub 2 Subtractive blending mode.
Mul 3 Multiplicative blending mode.
PremultAlpha 4 Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.


Name Value Description
Normal 0 Render the material using both light and non-light sensitive material properties.
Unshaded 1 Render the material as if there were no light.
LightOnly 2 Render the material as if there were only light.