Skip to content

Class: client_spawn_manager ​

Client-side spawn manager binding.

Source ​

C++ class client_spawn_manager

Custom Constructor ​

client_spawn_manager

Constructors ​

Constructor ​

ts
new client_spawn_manager(): client_spawn_manager;

Returns ​

client_spawn_manager

Methods ​

add() ​

Call Signature ​

ts
add(
   parent_id: number, 
   object_id: number, 
   cb: (this: void) => void): void;

Register a callback for a delayed client spawn.

Parameters ​
ParameterTypeDescription
parent_idnumberParent object id.
object_idnumberObject id waiting for spawn.
cb(this: void) => voidCallback called when the object is available.
Returns ​

void

Call Signature ​

ts
add(
   parent_id: number, 
   object_id: number, 
   cb: (this: void) => void, 
   object: XR_object): void;

Register a callback with user data for a delayed client spawn.

Parameters ​
ParameterTypeDescription
parent_idnumberParent object id.
object_idnumberObject id waiting for spawn.
cb(this: void) => voidCallback called when the object is available.
objectXR_objectExtra Lua object passed through the callback registry.
Returns ​

void


remove() ​

ts
remove(parent_id: number, object_id: number): void;

Remove a delayed spawn callback.

Parameters ​

ParameterTypeDescription
parent_idnumberParent object id.
object_idnumberDelayed object id.

Returns ​

void