Class CanvasItemMaterial
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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.
public class CanvasItemMaterial : Material, IDisposable
- Inheritance
-
CanvasItemMaterial
- Implements
- Inherited Members
Constructors
CanvasItemMaterial()
public CanvasItemMaterial()
Properties
BlendMode
The manner in which a material's rendering is applied to underlying textures.
public CanvasItemMaterial.BlendModeEnum BlendMode { get; set; }
Property Value
LightMode
The manner in which material reacts to lighting.
public CanvasItemMaterial.LightModeEnum LightMode { get; set; }
Property Value
ParticlesAnimHFrames
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 ParticlesAnimation is true
.
public int ParticlesAnimHFrames { get; set; }
Property Value
ParticlesAnimLoop
If true
, the particles animation will loop.
Note: This property is only used and visible in the editor if ParticlesAnimation is true
.
public bool ParticlesAnimLoop { get; set; }
Property Value
ParticlesAnimVFrames
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 ParticlesAnimation is true
.
public int ParticlesAnimVFrames { get; set; }
Property Value
ParticlesAnimation
If true
, enable spritesheet-based animation features when assigned to GpuParticles2D and CpuParticles2D nodes. The AnimSpeedMax or 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.
public bool ParticlesAnimation { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.