Skip to content

API Variable InputPlayers

github-actions[bot] edited this page Dec 1, 2026 · 5 revisions

Variable: InputPlayers

const InputPlayers: object;

Defined in: src/engine/input/facade.ts:368

Local players (ADR 0337): who has joined, joining and leaving by hand (input.join: "manual").

Type Declaration

all()

all(): PlayerInput[];

Every player in the current World, by index.

Returns

PlayerInput[]

get()

get(index): PlayerInput | null;

Player index in the current World, or null if they haven't joined.

Parameters

index

number

Returns

PlayerInput | null

join()

join(index?): PlayerInput;

Join a player (the lowest free index unless given). Pair devices with player.pair(device).

Parameters

index?

number

Returns

PlayerInput

leave()

leave(index): void;

Remove a player: their devices are unpaired and PlayerLeft announces it.

Parameters

index

number

Returns

void

of()

of(node): PlayerInput;

The input of the player controlling node (its pawn's), as this.input gives a behavior on it.

Parameters

node

GameObject

Returns

PlayerInput

Clone this wiki locally