Skip to content

ObjectManager

@vimp-mp/types 2.0.1

Interface · Client API

Creates client-local objects and tracks server-owned object wrappers.

ts
interface ObjectManager

Members

all

ts
readonly all: Array<Object>

All known non-destroyed objects, including remote objects with handle === 0.

count

ts
readonly count: number

Number of known non-destroyed objects.

create

ts
create(model: string | number, position: Vec3, rotation?: Vec3, options?: ObjectCreateOptions): Object | null

Creates a client-local object, or returns null if its model cannot be loaded.

destroy

ts
destroy(id: number): boolean

Destroys the client-local object identified by its wrapper id.

getById

ts
getById(id: number): Object | null

Returns a known object by client-local wrapper id.

getByRemoteId

ts
getByRemoteId(remoteId: number): Object | null

Returns a remote object by server/network id, including objects that are not currently streamed.

VIMP developer documentation