public void RequestRoomBundles()
        {
            // Generate temp bundle storage directory
            string roomBundleStorageDirectory = Config.Current.Room.CompileAbsoluteAssetDirectory() + "/temp";

            AbnormalDirectoryHandler.CreateDirectory(roomBundleStorageDirectory);
            //Directory.CreateDirectory(roomBundleStorageDirectory);

            Debug.debugging = true;
            Debug.Log("Testing whether room bundle was created at " + roomBundleStorageDirectory);
            if (Directory.Exists(roomBundleStorageDirectory))
            {
                Debug.Log("Room bundle storage directory exists!");
            }
            else
            {
                Debug.Log("Room bundle storage directory does NOT exist!");
            }
            Debug.debugging = false;

            Debug.Log("Room bundle storage directory = " + roomBundleStorageDirectory);
#if UNITY_ANDROID
            SocketClient_PC.RequestFiles(ServerFinder.serverIP, Config.Ports.AndroidRoomBundle, roomBundleStorageDirectory);
#else
            SocketClient_PC.RequestFiles(ServerFinder.serverIP, Config.Ports.RoomBundle, roomBundleStorageDirectory);
#endif

            InvokeRepeating("CopyRoomBundles", 3, 1);
        }
Пример #2
0
        public virtual void RequestRoomModel()
        {
            string roomName = UWB_Texturing.Config.RoomObject.GameObjectName;
            //string roomBundleDirectory = Config.AssetBundle.Current.CompileAbsoluteBundleDirectory();
            string roomBundleDirectory = Config.Current.AssetBundle.CompileAbsoluteAssetDirectory();
            int    roomBundlePort      = Config.Ports.RoomBundle;

#if !UNITY_WSA_10_0
            SocketClient_PC.RequestFiles(roomBundlePort, roomBundleDirectory);
#elif !UNITY_EDITOR && UNITY_WSA_10_0
            SocketClient_Hololens.RequestFiles(roomBundlePort, roomBundleDirectory);
#endif
            RoomManager.UpdateRoomBundle(roomName);
        }
        public override void OnJoinedRoom()
        {
            base.OnJoinedRoom();

            //string roomBundleDirectory = Config.Current.AssetBundle.CompileAbsoluteAssetDirectory();
            //string roomBundleStorageDirectory = Config.Current.Room.CompileAbsoluteAssetDirectory();
            //SocketClient_PC.RequestFiles(ServerFinder.serverIP, Config.Ports.RoomBundle, roomBundleStorageDirectory);
            RequestRoomBundles();
            //string rawRoomBundleDirectory = Config.Current.AssetBundle.CompileAbsoluteAssetDirectory();
            //SocketClient_PC.RequestFiles(ServerFinder.serverIP, Config.Ports.RoomResourceBundle, rawRoomBundleDirectory);
            string assetBundleDirectory = Config.Current.AssetBundle.CompileAbsoluteAssetDirectory();

            SocketClient_PC.RequestFiles(ServerFinder.serverIP, Config.Ports.Bundle, assetBundleDirectory);
        }