Class Decal
Actor that draws the can be used to draw a custom decals on top of the other objects.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ActorContextMenu("New/Visuals/Decal")]
[ActorToolbox("Visuals")]
[Unmanaged]
public class Decal : Actor, ISerializable
Constructors
Decal()
Properties
DrawMinScreenSize
The minimum screen size for the decal drawing. If the decal size on the screen is smaller than this value then decal will be culled. Set it to higher value to make culling more aggressive.
Declaration
[EditorOrder(30)]
[EditorDisplay("Decal", null)]
[Unmanaged]
public float DrawMinScreenSize { get; set; }
Property Value
|
System.Single
|
Material
The decal material. Must have domain mode to Decal type.
Declaration
[EditorOrder(10)]
[EditorDisplay("Decal", null)]
[Unmanaged]
public MaterialBase Material { get; set; }
Property Value
|
MaterialBase
|
RenderLayersMask
The layers mask used for render composition. Can be used to include or exclude specific actor layers from the drawing on top of them.
Declaration
[EditorOrder(25)]
[EditorDisplay("Decal", null)]
[Unmanaged]
public LayersMask RenderLayersMask { get; set; }
Property Value
|
LayersMask
|
Size
Gets or sets the decal bounds size (in local space).
Declaration
[EditorOrder(30)]
[Limit(0F, 3.40282347E+38F, 1F)]
[EditorDisplay("Decal", null)]
[Unmanaged]
public Vector3 Size { get; set; }
Property Value
|
Vector3
|
SortOrder
The decal rendering order. The higher values are render later (on top).
Declaration
[EditorOrder(20)]
[EditorDisplay("Decal", null)]
[Unmanaged]
public int SortOrder { get; set; }
Property Value
|
System.Int32
|
Methods
CreateAndSetVirtualMaterialInstance()
Utility to crate a new virtual Material Instance asset, set its parent to the currently applied material, and assign it to the decal. Can be used to modify the decal material parameters from code.
Declaration
[Unmanaged]
public MaterialInstance CreateAndSetVirtualMaterialInstance()
Returns
|
MaterialInstance
The created virtual material instance. |