Network Camera
When creating a multiplayer AR experience, it will be useful to know the camera poses of all connected players. This is managed by the NetworkCamera
component. To use it simply add it to the Camera
that has the ArCloudSession
attached to it.
This component will instantiate a GameObject
that has the NetworkCameraProxy
component for every connected clients. The NetworkCameraProxy
will synchronize the position and rotation of the camera proxy object. Developers can get the Transform
of a camera proxy by using the GetProxyByOwner
function in the NetworkCamera
component. The function takes a UInt32
representing the user’s number as the input parameter. This value can be obtained from calling Player.UserNumber
.
Developers can also get the current list of players by calling IGameSession.Players
.
public class NetworkCamera : MonoBehaviour
{
public Transform GetProxyByOwner(uint owner);
}