Skip to content

DecalSystem

Matt Dean edited this page Jan 24, 2020 · 2 revisions

The main static class for kDecals. This class defines all the API required for creating and managing decals.

Public Properties

decals (List Decal [get]) - All currently active Decals.

Public Methods

HasDecalPool

return bool

Tests for existing Pool of type T with given key.

Argument Type Description
decalData DecalData Tests whether Pool exists for DecalData.

CreateDecalPool

return void

Create Pool for Decals using DecalData as key.

Argument Type Description
decalData DecalData DecalData to create Decals from.

DestroyDecalPool

return void

Destroy Pool of Decals.

Argument Type Description
decalData DecalData Key for Pool to destroy.

GetDecal

return Decal

Get new Decal and set Transform. If Pooling is enabled on DecalData, Decal will be taken from Pool.

Argument Type Description
decalData DecalData DecalData to create Decal from.
position Vector3 World space position for Decal.
direction Vector3 World space forward direction for Decal.
scale Vector2 Local space scale for Decal.

GetDecal

return Decal

Get new Decal. If Pooling is enabled on DecalData, Decal will be taken from Pool.

Argument Type Description
decalData DecalData DecalData to create Decal from.

RemoveDecal

return void

Remove existing Decal. If Pooling is enabled on DecalData, Decal will be returned to Pool.

Argument Type Description
decal Decal Decal to remove.