ECSWorldBridge
La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.
public sealed class ECSWorldBridge : MonoBehaviourNamespace NodeWorld.ECS.
The bridge to the ECS world that interpolates the other players' avatars and lip sync.
Properties
Instance
public static ECSWorldBridge Instance { get; }The bridge, or null before Ensure.
Methods
Ensure
public static ECSWorldBridge Ensure()The bridge, created the first time.
DestroyInstance
public static void DestroyInstance()Destroys the bridge and its entities.
SpawnRemoteAvatarEntity
public Entity SpawnRemoteAvatarEntity(uint playerId, int boneCount)Creates the entity of another player's avatar with boneCount synced bones.
PushRemoteAvatarState
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
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
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
public void PushVisemeTargets(Entity entity, float[] targetWeights)Sets the viseme weights the lip sync moves toward.
CopyVisemeWeights
public bool CopyVisemeWeights(Entity entity, float[] destination)Copies the current viseme weights into destination; false when the entity is gone.
DestroyRemoteAvatarEntity
public void DestroyRemoteAvatarEntity(uint playerId, Entity entity)Destroys the entity of a player's avatar.
DestroyEntity
public void DestroyEntity(Entity entity)Destroys an entity.
Clear
public void Clear()Destroys every entity of the bridge.
