RemoteNameplate

csharp
public sealed class RemoteNameplate : MonoBehaviour

Namespace NodeWorld.Avatar.

Floats above a remote avatar's head and turns to face the viewer. Holds who the player is and how loud they are talking; the client view on the same prefab draws it (picture, name, platform, status, voice ring).

Properties

PlayerId

csharp
public uint PlayerId { get; }

The player's ID in the room.

UserId

csharp
public string UserId { get; }

The player's account ID.

DisplayName

csharp
public string DisplayName { get; }

The player's name.

Platform

csharp
public string Platform { get; }

What the player plays on ("windows", "linux", "android"), empty when unknown.

VoiceLevel

csharp
public float VoiceLevel { get; }

Loudness (RMS) of the player's last voice frame, 0 once they have been quiet for a moment.

Methods

Initialize

csharp
public void Initialize(Func<Vector3> getViewpointPosition, uint playerId, string userId, string displayName, string platform)

Sets up the nametag of a player, placed above getViewpointPosition.

FeedVoice

csharp
public void FeedVoice(float[] pcm, int sampleCount)

Decoded voice of this player (may be called off the main thread).

RefreshTransform

csharp
public void RefreshTransform()

Places the nametag above the player's head, facing the camera.

Events

Configured

csharp
public event Action Configured

Fired when Initialize has set who the player is.