예제 #1
0
 /// <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();
     }
 }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pAnchor"></param>
        public void RegisterRoomCloudAnc(Anchor pAnchor, RoomCloudAncEvent pSuccessCall, RoomCloudAncEvent pFailureCall)
        {
            regedistRoomCloudAncFailureEvent = pFailureCall;
            regedistRoomCloudAncSuccessEvent = pSuccessCall;

            if (currRoomCloudAnc == null)
            {
                GameObject vAncObj = GameObject.Instantiate <GameObject>(prefabAncPrefab);
                currRoomCloudAnc = vAncObj.GetComponent <SenseAR_CloudAnchorProxy>();
            }
            if (currRoomCloudAnc.isCanCreatFromClient())
            {
                currRoomCloudAnc.ReBindCloudCreateSuccessEvent(RegisterRoomCloudOver);
                currRoomCloudAnc.ReBindCloudCreateFailureEvent(RegisterRoomCloudOver);
                currRoomCloudAnc.CreatFromClient(pAnchor);
            }
            else
            {
                NotifyRegisterRoomCloudFailure();
            }
        }