Coming soon toSteam
Modding docsAPI 1

Module · Engine client only

assets

Load the pictures and models your mod ships with, and make materials. Everything is freed when your mod stops.

assets.material(options?: any): Material

client only

Makes a material of your own.

local m = assets.material{ color = color("#c04020"), metallic = 0.2, roughness = 0.6 }

assets.model(path: string): Model

client only

Loads a model from your mod (.glb, .gltf, .obj or .fbx) and returns what it contains.

local sphere = assets.model("models/sphere.glb")
log.info("triangles:", sphere.triangles)

assets.texture(path: string, use?: string): Texture

client only

Loads a picture from your mod.

local icon = assets.texture("ui/icon.png")

assets.usage(): any

client only

How much memory this mod's loaded files are using.