self:get_texture

Client

Retrieves the path of the currently active texture on the area light


Syntax

local result = self:get_texture()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
string | boolresultPath of the active texture, false if no texture is applied

Examples

Retrieve the active texture on an area light
local entity = light.area.create()
local texture = entity:get_texture()

if texture then
    core.engine.print("info", "Area light texture:", texture)
else
    core.engine.print("info", "No texture applied")
end

On this page