Skip to content

Latest commit

 

History

History
 
 

com.meta.multiplayer.netcode-photon

Meta Multiplayer for Netcode and Photon Package

This package contains core implementation to start a multiplayer project while using Netcode for gameobject and Photon as the transport layer.

Avatar

Script Description
AvatarEntity Implementation of the OvrAvatarEntity that sets up the avatar based on the user ID, integrates the body tracking, events on joints loaded, hide and show avatar, tracks camera rig, as well as local and remote setup.
AvatarNetworking Combined with the AvatarEntity, this script handles the networked updates of the avatar state. For a local avatar it will send the data to other players and for a remote avatar it will receive and apply the updates. You can send the data LOD frequency based on your needs.

Core

Script Description
BlockUserManager Handles the platform blocking APIs. On initialize you get the list of blocked users and it centralizes the logic to block, unblock and query if a user is blocked.
CameraRigRef Singleton that keeps a reference to the camera rig and OvrAvatarInputManager for easy access through the application.
ClientNetworkTransform Based on the netcode networktransform documentation, it handles client authoritative transform synchronization.
GroupPresenceState Handles the platform GroupPresence API and keeps track of the user presence state. This is used for social platform functionalities like invites, rosters and join.
NetworkLayer This is the core for handling the networking state. It handles connection as Host or Client, disconnection and reconnection flows. It supplies multiple callback for different state changes that can be handled at the application implementation level, keeping this agnostic from the application implementation.
NetworkSession A network behaviour spawned by the host to sync information about the current session. It syncs the photon voice room name and contains logic to detect and sync which client would be the fallback host if the host disconnects.
SceneLoader Handles loading the scene based on the networking context. It also keeps track of which scene is loaded and when the load is completed.
VoipController Controls the creation of the speaker(remote) or the recorder(local) as well as microphone permissions. It also connects the voip to the right room when it is set.
VoipHandler Keeps a reference of the speaker or recorder and handles muting the right component.