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

Properties20

Showing 20 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 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