Skip to content

addCustomTextureAsync

Starts an asynchronous texture download.

Syntax

lua
Ham.addCustomTextureAsync(textureName, textureUrl)

Parameters

NameTypeDescription
textureNamestringLocal filename to cache as
textureUrlstringURL to download the texture from

Returns

  • integer - Request ID (use with getAsyncTextureResult)

Example

lua
local requestId = Ham.addCustomTextureAsync("bigimage.png", "https://example.com/big.png")

See Also

Released under the ISC License.