Model

self:set_component_wireframe

Client

Shows or hides the debug wireframe of one or more components on the model

Syntax

local status = self:set_component_wireframe(
    component,
    state
)

The wireframe follows the mesh that is currently drawn.

  • Respects LOD — draws whatever is currently visible, full detail or a lower LOD.
  • Rigged components — skinned components are supported.
  • Local only — a debug view on this client, never replicated to other peers.

Parameters

TypeNameDescription
stringcomponentPath of the component to update
Supports * as a wildcard to match multiple components by pattern
boolstateDetermines the visibility of the wireframe:
• When true - the wireframe is shown
• When false - the wireframe is hidden

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Show the debug wireframe on a component
core.model.load("character", "models/character.glb")

local entity = core.model.create("character")

entity:set_component_wireframe("Skeleton3D/Body", true)
Check how a component reduces at its lowest LOD
local entity = core.model.create("character")

entity:set_component_wireframe("*", true)
entity:set_component_lod_bias("*", 0)

On this page