/// <summary> /// /// </summary> /// <param name="pSuccessCall"> Create Over CallBack</param> public void createRoom(CloudRoomEvent pSuccessCall) { Session.SetKeyAndSecret(cloud_key, cloud_sto); CreateRoomSuccessEvent = null; CreateRoomSuccessEvent += pSuccessCall; CloudRoomID = ARCloudClient.createRoom().Value; isRoommer = true; NotifyCloudRoomCreateSuccess(); }
private void RegisterRoomCloudOver() { if (currRoomCloudAnc.IsSetupCloudPoint()) { ARCloudClient.saveAnchorId(CloudRoomID, currRoomCloudAnc.GetAncContentStr()); NotifyRegisterRoomCloudSuccess(); } else { NotifyRegisterRoomCloudFailure(); } }
/// <summary> /// /// </summary> /// <param name="pAnchor"></param> public void LoadRoomCloudAnc(RoomCloudAncEvent pSuccessCall, RoomCloudAncEvent pFailureCall) { LoadRoomCloudAncSuccessEvent = pSuccessCall; LoadRoomCloudAncFailureEvent = pFailureCall; if (currRoomCloudAnc == null) { GameObject vAncObj = GameObject.Instantiate <GameObject>(prefabAncPrefab); currRoomCloudAnc = vAncObj.GetComponent <SenseAR_CloudAnchorProxy>(); } if (currRoomCloudAnc.isCanCreatFromClient()) { currRoomCloudAnc.ReBindSyncFromCloudSuccessEvent(LoadRoomCloudAncOver); currRoomCloudAnc.ReBindSyncFromCloudFailureEvent(LoadRoomCloudAncOver); RetStr vAncContentCloud = ARCloudClient.enterRoom(CloudRoomID); currRoomCloudAnc.ReaderFormCloud(vAncContentCloud); } else { NotifyLoadRoomCloudAncFailure(); } }