self:destroy

Client

Destroys the audio-2d instance and frees its resources


Syntax

local status = self:destroy()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Destroy an audio-2d instance
local entity = core.audio_2d.create("sounds/ambient.ogg")

entity:destroy()

On this page