NodeWorld

ECSWorldBridge

La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.

csharp
public sealed class ECSWorldBridge : MonoBehaviour

Namespace NodeWorld.ECS.

The bridge to the ECS world that interpolates the other players' avatars and lip sync.

Properties

Instance

csharp
public static ECSWorldBridge Instance { get; }

The bridge, or null before Ensure.

Methods

Ensure

csharp
public static ECSWorldBridge Ensure()

The bridge, created the first time.

DestroyInstance

csharp
public static void DestroyInstance()

Destroys the bridge and its entities.

SpawnRemoteAvatarEntity

csharp
public Entity SpawnRemoteAvatarEntity(uint playerId, int boneCount)

Creates the entity of another player's avatar with boneCount synced bones.

PushRemoteAvatarState

csharp
public void PushRemoteAvatarState(uint playerId, Vector3 position, Quaternion rotation, Vector3[] bonePositions, Quaternion[] boneRotations, bool snapToTarget, bool snapBonesToTarget)

Stores the pose received for a player's avatar: the entity moves toward it.

ApplyRemoteAvatarPose

csharp
public bool ApplyRemoteAvatarPose(Entity entity, Transform avatarRoot, Transform[] boneTransforms)

Copies the interpolated pose of entity onto the avatar's root and bones; false when it has none yet.

CreateVisemeEntity

csharp
public Entity CreateVisemeEntity(int blendShapeCount, float attackSpeed, float decaySpeed)

Creates the lip sync entity of an avatar with blendShapeCount visemes and its attack and decay speeds.

PushVisemeTargets

csharp
public void PushVisemeTargets(Entity entity, float[] targetWeights)

Sets the viseme weights the lip sync moves toward.

CopyVisemeWeights

csharp
public bool CopyVisemeWeights(Entity entity, float[] destination)

Copies the current viseme weights into destination; false when the entity is gone.

DestroyRemoteAvatarEntity

csharp
public void DestroyRemoteAvatarEntity(uint playerId, Entity entity)

Destroys the entity of a player's avatar.

DestroyEntity

csharp
public void DestroyEntity(Entity entity)

Destroys an entity.

Clear

csharp
public void Clear()

Destroys every entity of the bridge.