Skip to content

@temporary-escape/mod-sdk / addOnInit

Function: addOnInit() ​

ts
function addOnInit(cb: InitCallback): void;

Defined in: init.ts:29

Registers a callback that runs when the host calls onInit. The callback receives the current Runtime and is responsible for checking it (for example, sector-only content guards on runtime == Runtime.Sector).

Parameters ​

ParameterType
cbInitCallback

Returns ​

void