Skip to content
M2O Scripting APIScripting reference
Data shapeServer APIGenerated

EntityCollection\<T\>

Defined in: shared.d.ts:75

Live array-like view over the replicated entity handles of one category. Every member re-walks the replication set at call time, so the contents follow the world without being refreshed.

This is not an Array and not iterable: there is no index access, no spreading, and for..of throws. Use forEach to walk it, or filter/map to obtain a real array.

T

every(callback): boolean

Defined in: shared.d.ts:83

(entity) => unknown

boolean


filter(callback): T[]

Defined in: shared.d.ts:79

(entity) => unknown

T[]


find(callback): T | undefined

Defined in: shared.d.ts:80

(entity) => unknown

T | undefined


forEach(callback): void

Defined in: shared.d.ts:78

(entity) => void

void


map<U>(callback): U[]

Defined in: shared.d.ts:81

U

(entity) => U

U[]


some(callback): boolean

Defined in: shared.d.ts:82

(entity) => unknown

boolean

readonly length: number

Defined in: shared.d.ts:77

Number of entities in the collection right now.