Skip to content
EN

Interface: ComponentHandler ​

Legacy lifecycle handler still accepted by SceneLoadContext.handlers.

Methods ​

onLoad()? ​

ts
onLoad?(context): void;

Parameters ​

ParameterType
contextComponentHandlerContext

Returns ​

void


onUpdate()? ​

ts
onUpdate?(context, dt): void;

Parameters ​

ParameterType
contextComponentHandlerContext
dtnumber

Returns ​

void


onDestroy()? ​

ts
onDestroy?(context): void;

Parameters ​

ParameterType
contextComponentHandlerContext

Returns ​

void


getNative()? ​

ts
getNative?(context): unknown;

Optional logic object bound to the component (script instance, module controller). Exposed as ComponentHandle.native().

Parameters ​

ParameterType
contextComponentHandlerContext

Returns ​

unknown

Suity 开发者文档 · API 由 TypeDoc 从声明文件生成