void Start() { var streams = new List <AirXRServerStreamHandover.Streams>(); AirXRServerStreamHandover.TakeAllStreamsHandedOverInPrevScene(streams); foreach (var item in streams) { var selected = notifyCameraRigWillBeBound(item.playerID); if (selected != null) { _cameraRigList.RetainCameraRig(selected); selected.BindPlayer(item.playerID, item.mediaStream, item.inputStream); if (selected.isStreaming && Delegate != null) { Delegate.AirXRCameraRigActivated(selected); } } else { AXRServerPlugin.Disconnect(item.playerID); } } updateApplicationTargetFrameRate(); eventDispatcher.MessageReceived += onAirXRMessageReceived; }
private void onAirXRPlayerActivated(int playerID, AirXRServerMessage message) { var cameraRig = _cameraRigList.GetBoundCameraRig(playerID); if (cameraRig != null && Delegate != null) { Delegate.AirXRCameraRigActivated(cameraRig); } updateApplicationTargetFrameRate(); }