reckfellENGINE

CanvasItemMaterial

A material for CanvasItems.

On this page
class CanvasItemMaterialReckfellSharpInherits Material

A material for CanvasItems.

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.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

CanvasItemMaterialConstructor
# CanvasItemMaterial
C#
public CanvasItemMaterial();

Properties6

BlendModeProperty
# BlendMode
C#
public CanvasItemMaterial.BlendModeEnum BlendMode { get; set; }

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

LightModeProperty
# LightMode
C#
public CanvasItemMaterial.LightModeEnum LightMode { get; set; }

The manner in which material reacts to lighting.

ParticlesAnimHFramesProperty
# ParticlesAnimHFrames
C#
public int ParticlesAnimHFrames { get; set; }

The number of columns in the spritesheet assigned as Texture2D for a GpuParticles2D or CpuParticles2D. Note: This property is only used and visible in the editor if CanvasItemMaterial.ParticlesAnimation is true.

ParticlesAnimLoopProperty
# ParticlesAnimLoop
C#
public bool ParticlesAnimLoop { get; set; }

If true, the particles animation will loop. Note: This property is only used and visible in the editor if CanvasItemMaterial.ParticlesAnimation is true.

ParticlesAnimVFramesProperty
# ParticlesAnimVFrames
C#
public int ParticlesAnimVFrames { get; set; }

The number of rows in the spritesheet assigned as Texture2D for a GpuParticles2D or CpuParticles2D. Note: This property is only used and visible in the editor if CanvasItemMaterial.ParticlesAnimation is true.

ParticlesAnimationProperty
# ParticlesAnimation
C#
public bool ParticlesAnimation { get; set; }

If true, enable spritesheet-based animation features when assigned to GpuParticles2D and CpuParticles2D nodes. The ParticleProcessMaterial.AnimSpeedMax or CpuParticles2D.AnimSpeedMax should also be set to a positive value for the animation to play. This property (and other particles_anim_* properties that depend on it) has no effect on other types of nodes.

Methods12

GetBlendModeCanvasItemMaterial.BlendModeEnum
# GetBlendMode
C#
public CanvasItemMaterial.BlendModeEnum GetBlendMode();
Returns CanvasItemMaterial.BlendModeEnum
GetLightModeCanvasItemMaterial.LightModeEnum
# GetLightMode
C#
public CanvasItemMaterial.LightModeEnum GetLightMode();
Returns CanvasItemMaterial.LightModeEnum
GetParticlesAnimHFramesint
# GetParticlesAnimHFrames
C#
public int GetParticlesAnimHFrames();
Returns int
GetParticlesAnimLoopbool
# GetParticlesAnimLoop
C#
public bool GetParticlesAnimLoop();
Returns bool
GetParticlesAnimVFramesint
# GetParticlesAnimVFrames
C#
public int GetParticlesAnimVFrames();
Returns int
GetParticlesAnimationbool
# GetParticlesAnimation
C#
public bool GetParticlesAnimation();
Returns bool
SetBlendModevoid
# SetBlendMode
C#
public void SetBlendMode(CanvasItemMaterial.BlendModeEnum blendMode);
Parameters
NameTypeDefault
blendModeCanvasItemMaterial.BlendModeEnum—
SetLightModevoid
# SetLightMode
C#
public void SetLightMode(CanvasItemMaterial.LightModeEnum lightMode);
Parameters
NameTypeDefault
lightModeCanvasItemMaterial.LightModeEnum—
SetParticlesAnimHFramesvoid
# SetParticlesAnimHFrames
C#
public void SetParticlesAnimHFrames(int frames);
Parameters
NameTypeDefault
framesint—
SetParticlesAnimLoopvoid
# SetParticlesAnimLoop
C#
public void SetParticlesAnimLoop(bool loop);
Parameters
NameTypeDefault
loopbool—
SetParticlesAnimVFramesvoid
# SetParticlesAnimVFrames
C#
public void SetParticlesAnimVFrames(int frames);
Parameters
NameTypeDefault
framesint—
SetParticlesAnimationvoid
# SetParticlesAnimation
C#
public void SetParticlesAnimation(bool particlesAnim);
Parameters
NameTypeDefault
particlesAnimbool—

CanvasItemMaterial.BlendModeEnum

ValueDescription
Add = 1

Additive blending mode.

Mix = 0

Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.

Mul = 3

Multiplicative blending mode.

PremultAlpha = 4

Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.

Sub = 2

Subtractive blending mode.

CanvasItemMaterial.LightModeEnum

ValueDescription
LightOnly = 2

Render the material as if there were only light.

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.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.