๐๏ธ Decal
Decals are Materials that are projected onto meshes in your level, including Static Meshes and Skeletal Meshes

Client OnlyAPI Source
๐ชInheritance
๐ Examplesโ
Client/Index.lua
local my_decal = Decal(
Vector(100, 200, 0), -- location
Rotator(0, 90, 90), -- rotation
"nanos-world::M_Default_Translucent_Lit_Decal", -- material
Vector(128, 256, 256), -- size
60, -- lifespan
0.01 -- fade screen size
)
my_decal:SetMaterialTextureParameter("Texture", "package://my_package/Client/image.jpg")
๐ Constructorsโ
Default Constructorโ
No description provided
local my_decal = Decal(location, rotation, material_asset, size?, lifespan?, fade_screen_size?)
Parameters
| Name | Type | Description |
|---|---|---|
location | Vector | World location to spawn at |
rotation | Rotator | World rotation to spawn with |
material_asset | Material Reference | Material Asset |
size? | Vector | Size of the Decal Default Vector(128, 256, 256) |
lifespan? | float | Time until automatically destroyed in seconds Default 60 |
fade_screen_size? | float | Size percentage in screen to fade out Default 0.01 |
๐ฟ Static Functionsโ
This class doesn't have own static functions.
Inherited static functions
From Entity11 functions
Events
Subscribe, UnsubscribeNetwork
SubscribeRemoteQueries
GetAll, GetByIndex, GetCount, GetPairs๐ฆ Functionsโ
SetFadeIn | Starts fading in this Decal after a delay | |
SetFadeOut | Starts fading out this Decal after a delay | |
SetSize | Sets the size of this Decal |
Inherited functions
From Paintable14 functions
All functions
GetMaterialColorParameter, GetMaterialScalarParameter, GetMaterialTextureParameter, GetMaterialVectorParameter, ResetMaterial, SetMaterial, SetMaterialColorParameter, SetMaterialFromCanvas, SetMaterialFromSceneCapture, SetMaterialFromWebUI, SetMaterialScalarParameter, SetMaterialTextureParameter, SetMaterialVectorParameter, SetPhysicalMaterialFrom Actor60 functions
Appearance
GetDistanceFromCamera, GetScreenPercentage, IsVisible, SetCastShadow, SetHighlightEnabled, SetOutlineEnabled, SetRenderCullDistance, SetVisibility, WasRecentlyRenderedAttachments
AttachTo, Detach, GetAttachedEntities, GetAttachedTo, GetAttachedToSocket, GetSocketTransformLifecycle
GetLifeSpan, SetLifeSpanNetwork
GetDimension, GetNetworkAuthority, HasNetworkAuthority, IsNetworkDistributed, SetDimension, SetDistanceOptimizationMultiplier, SetNetworkAuthority, SetNetworkAuthorityAutoDistributedFrom Entity21 functions
Data
GetAllValuesKeys, GetValue, SetValueEvents
Subscribe, UnsubscribeLifecycle
Destroy, FinishSpawn, IsBeingDestroyed, IsSpawned, IsValid, SetSpawnModeNetwork
BroadcastRemoteEvent, BroadcastRemoteInRadiusEvent, CallRemoteEvent, CallRemoteEvent, CallRemotePlayersEvent, HasAuthority, SubscribeRemoteQueries
GetID
SetFadeInOptimalโ
Starts fading in this Decal after a delay
my_decal:SetFadeIn(start_delay, duration)

SetFadeOutOptimalโ
Starts fading out this Decal after a delay
my_decal:SetFadeOut(start_delay, duration, destroy_after_fade_out?)

SetSizeOptimalโ
Sets the size of this Decal
my_decal:SetSize(size)
Parameters
| Name | Type | Description |
|---|---|---|
size | Vector | New size of the Decal |
๐ Eventsโ
This class doesn't have own events.
Inherited events
From Actor5 events
From Entity4 events
All events
ClassRegister, Destroy, Spawn, ValueChange