SimulatedPlayerManager

csharp
public sealed class SimulatedPlayerManager

Namespace NodeWorld.SDK.Shared.PlayMode.

The players of a world in Play mode: the local player and simulated other players, to test a world alone.

Constructors

SimulatedPlayerManager

csharp
public SimulatedPlayerManager(IPlayModeRemoteAvatarDriver remoteAvatarDriver)

A manager whose simulated players' avatars are moved by remoteAvatarDriver.

Properties

Players

csharp
public IReadOnlyList<SimulatedPlayer> Players { get; }

The players, local one first.

Methods

AddLocalPlayer

csharp
public SimulatedPlayer AddLocalPlayer(Transform transform)

Adds the local player, following transform.

csharp
public SimulatedPlayer AddLocalPlayer(Vector3 position, Quaternion rotation)

Adds the local player at a position.

SpawnPlayer

csharp
public SimulatedPlayer SpawnPlayer(Vector3 position, Quaternion rotation)

Adds a simulated other player.

DespawnPlayer

csharp
public void DespawnPlayer(uint playerId)

Removes the player playerId.

GetPlayer

csharp
public IPlayerInfo GetPlayer(uint playerId)

The player playerId, or null.

GetAllPlayerIds

csharp
public IReadOnlyList<uint> GetAllPlayerIds()

The IDs of every player.

Clear

csharp
public void Clear()

Removes every player.