Decalclass

The Decal component projects textures onto model's opaque or transparent surfaces. They inherit and modify the PBR properties of the surface they're projected on.

objectComponentDecal
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Decal : Sandbox.Component

Constructors1

Showing 1 constructors

public Decal()PUBLICCONSTRUCTOR

Methods2

Showing 2 methods

public static void Upgrader_v2(System.Text.Json.Nodes.JsonObject json)PUBLICSTATIC

ParameterTypeDescription
jsonJsonObject
Returns:void

public static void Upgrader_v3(System.Text.Json.Nodes.JsonObject json)PUBLICSTATIC

ParameterTypeDescription
jsonJsonObject
Returns:void

Properties22

Showing 22 properties

public float Sandbox.Decal.AttenuationAngle { get; set; }PUBLICGETSET

Attenuation angle controls how much the decal fades at an angle. At 0 it does not fade at all. Up to 1 it fades the most.

Returns:float

public Sandbox.ParticleFloat Sandbox.Decal.ColorMix { get; set; }PUBLICGETSET

Controls the opacity of the decal's color texture without reducing the impact of the normal or rmo texture. Set to 0 to create a normal/rmo only decal masked by the color textures alpha.

Returns:ParticleFloat

public Sandbox.Texture Sandbox.Decal.ColorTexture { get; set; }PUBLICGETSETOBSOLETE

Obsolete: This API member is obsolete.

Returns:Texture

public Sandbox.ParticleGradient Sandbox.Decal.ColorTint { get; set; }PUBLICGETSET

Tints the color of the decal's albedo and can be used to adjust the overall opacity of the decal.

Returns:ParticleGradient

public virtual int Sandbox.Decal.ComponentVersion { get; set; }PUBLICVIRTUALGETSET

Returns:int

public Sandbox.ParticleFloat Sandbox.Decal.CoverageAmount { get; set; }PUBLICGETSET

Adjusts the opacity mask based on the height map. At 1 decal is fully visible, and at 0 it goes invisible. This setting requires a valid height map on your decals.

Returns:ParticleFloat

public float Sandbox.Decal.CoverageRange { get; set; }PUBLICGETSET

Controls the smoothness of height coverage. No fade at 0, maximum fade at 0.5.

Returns:float

public float Sandbox.Decal.Depth { get; set; }PUBLICGETSET

The depth of the decal in world units. This is how far the decal extends into the surface it is projected onto.

Returns:float

public bool Sandbox.Decal.Looped { get; set; }PUBLICGETSET

If true then the decal will repeat itself forever

Returns:bool

public Sandbox.Texture Sandbox.Decal.NormalTexture { get; set; }PUBLICGETSETOBSOLETE

Obsolete: This API member is obsolete.

Returns:Texture

public Sandbox.Texture Sandbox.Decal.RMOTexture { get; set; }PUBLICGETSETOBSOLETE

Obsolete: This API member is obsolete.

Returns:Texture

public uint Sandbox.Decal.SequenceId { get; set; }PUBLICGETSET

Which sequence to use

Returns:uint

public bool Sandbox.Decal.SheetSequence { get; set; }PUBLICGETSET

Returns:bool

public Vector2 Sandbox.Decal.Size { get; set; }PUBLICGETSET

A 2D size of the decal in world units.

Returns:Vector2

public uint Sandbox.Decal.SortLayer { get; set; }PUBLICGETSET

Determines the order the decal gets rendered in, the higher the layer the more priority it has. Decals on the same layer get automatically sorted by their GameObject ID.

Returns:uint

public bool Sandbox.Decal.Transient { get; set; }PUBLICGETSET

If true then this decal will automatically get removed when maxdecals are exceeded. This is good for things like bullect impacts, where you want to keep them around for as long as possible but also don't want to have an unlimited amount of them hanging around. Note that while the component will be destroyed, you probably want a TemporaryEffect component on the GameObject to make sure it all gets fully deleted.

Returns:bool

public BBox Sandbox.Decal.WorldBounds { get; set; }PUBLICGETSET

Get the world bounds of this decal

Returns:BBox

On this page

Constructorspublic Decal()Methodspublic static System.Void Upgrader_v2(System.Text.Json.Nodes.JsonObject json)public static System.Void Upgrader_v3(System.Text.Json.Nodes.JsonObject json)Propertiespublic System.Single Sandbox.Decal.AttenuationAngle { get; set; }public Sandbox.ParticleFloat Sandbox.Decal.ColorMix { get; set; }public Sandbox.Texture Sandbox.Decal.ColorTexture { get; set; }public Sandbox.ParticleGradient Sandbox.Decal.ColorTint { get; set; }public virtual System.Int32 Sandbox.Decal.ComponentVersion { get; set; }public Sandbox.ParticleFloat Sandbox.Decal.CoverageAmount { get; set; }public System.Single Sandbox.Decal.CoverageRange { get; set; }public System.Collections.Generic.List`1<Sandbox.DecalDefinition> Sandbox.Decal.Decals { get; set; }public System.Single Sandbox.Decal.Depth { get; set; }public Sandbox.ParticleFloat Sandbox.Decal.LifeTime { get; set; }public System.Boolean Sandbox.Decal.Looped { get; set; }public Sandbox.Texture Sandbox.Decal.NormalTexture { get; set; }public Sandbox.ParticleFloat Sandbox.Decal.Parallax { get; set; }public Sandbox.Texture Sandbox.Decal.RMOTexture { get; set; }public Sandbox.ParticleFloat Sandbox.Decal.Rotation { get; set; }public Sandbox.ParticleFloat Sandbox.Decal.Scale { get; set; }public System.UInt32 Sandbox.Decal.SequenceId { get; set; }public System.Boolean Sandbox.Decal.SheetSequence { get; set; }public Vector2 Sandbox.Decal.Size { get; set; }public System.UInt32 Sandbox.Decal.SortLayer { get; set; }public System.Boolean Sandbox.Decal.Transient { get; set; }public BBox Sandbox.Decal.WorldBounds { get; set; }Metadata