self:get_size

Client

Retrieves the current size of the texture


Syntax

local size = self:get_size()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector2sizeSize of the texture as {width, height}

Examples

Get the size of a texture
local entity = core.texture.create("assets/sprite.png")
local size = entity:get_size()

core.engine.print("info", "Texture size:", util.table.unpack(size))

On this page