Exemplo n.º 1
0
 public static void PackRoomResourceBundle()
 {
     Config.Current.Room.SetFolders();
     RoomManager.SyncRoomName();
     //UWB_Texturing.BundleHandler.PackRawRoomTextureBundle(BuildTarget.StandaloneWindows);
     RoomHandler.PackRawRoomResourceBundle(UWB_Texturing.Config.RoomObject.GameObjectName);
 }
Exemplo n.º 2
0
        public static void InstantiateAllRooms()
        {
            Config.Current.Room.SetFolders();
            string roomName = RoomManager.SyncRoomName();

            UWB_Texturing.BundleHandler.InstantiateAllRooms();
        }
Exemplo n.º 3
0
 public static void PackAllRoomBundles()
 {
     Config.Current.Room.SetFolders();
     RoomManager.SyncRoomName();
     //UWB_Texturing.BundleHandler.PackAllFinalRoomBundles(BuildTarget.StandaloneWindows);
     RoomHandler.PackAllRoomBundles();
 }
Exemplo n.º 4
0
        public static void RemoveRoomRawInfo()
        {
            Config.Current.Room.SetFolders();
            string roomName = RoomManager.SyncRoomName();

            UWB_Texturing.BundleHandler.RemoveRawInfo(roomName);
        }
Exemplo n.º 5
0
        public static void RemoveRoomPrefab()
        {
            Config.Current.Room.SetFolders();
            string roomName = RoomManager.SyncRoomName();

            UWB_Texturing.PrefabHandler.DeletePrefab(roomName);
        }
Exemplo n.º 6
0
        public static void InstantiateRoomPrefab()
        {
            Config.Current.Room.SetFolders();
            string     roomName = RoomManager.SyncRoomName();
            GameObject room     = GameObject.Find(roomName);

            UWB_Texturing.PrefabHandler.CreateRoomPrefab(room);
        }
Exemplo n.º 7
0
//        private static PhotonView photonView;

//        public void Start()
//        {
//            //photonView = PhotonView.Get(GameObject.Find("NetworkManager").GetComponent<PhotonView>());
//            photonView = PhotonView.Find(1);
//            if (photonView == null)
//                Debug.Log("Wrong photon view id given");
//            // ERROR TESTING
//        }

//#if UNITY_EDITOR
//        public static void PackRawResourcesBundle()
//        {
//            //string destinationDirectory = Config.AssetBundle.PC.CompileAbsoluteBundleDirectory();
//            //UWB_Texturing.BundleHandler.PackRawRoomTextureBundle(destinationDirectory, BuildTarget.StandaloneWindows);  // MUST INCORPORATE CODE THAT WILL ANALYZE TARGET ID/TARGET AND SET CORRECT BUILDTARGET FOR PACKING AND SENDING ASSET BUNDLE
//            UWB_Texturing.BundleHandler.PackRawRoomTextureBundle(BuildTarget.StandaloneWindows);
//        }

//        public static void PackRoomBundle()
//        {
//            //string destinationDirectory = Config.AssetBundle.PC.CompileAbsoluteBundleDirectory();
//            //UWB_Texturing.BundleHandler.PackFinalRoomBundle(destinationDirectory, BuildTarget.StandaloneWindows);  // MUST INCORPORATE CODE THAT WILL ANALYZE TARGET ID/TARGET AND SET CORRECT BUILDTARGET FOR PACKING AND SENDING ASSET BUNDLE
//            UWB_Texturing.BundleHandler.PackFinalRoomBundle(BuildTarget.StandaloneWindows);
//        }
//#endif

//        public static void ExportRawResources(int targetID)
//        {
//            //string filepath = Config.AssetBundle.Current.CompileAbsoluteBundlePath(UWB_Texturing.Config.AssetBundle.RawPackage.CompileFilename());
//            string filepath = Config.Current.AssetBundle.CompileAbsoluteAssetPath(UWB_Texturing.Config.AssetBundle.RawPackage.CompileFilename());
//            int rawRoomPort = Config.Ports.RoomResourceBundle_ClientToServer;
//#if !UNITY_WSA_10_0
//            SocketClient_PC.SendFile(ServerFinder.serverIP, rawRoomPort, filepath);
//            Debug.Log("Exporting raw room resources not currently implemented correctly! Doesn't consider target ID and just sends to master");
//#elif !UNITY_EDITOR && UNITY_WSA_10_0
//            SocketClient_Hololens.SendFile(ServerFinder_Hololens.serverIP, rawRoomPort, filepath);
//#endif
//        }


        //public static void ProcessRoomResources()
        //{
        //    string roomName = UWB_Texturing.Config.RoomObject.GameObjectName;
        //    //string customOrientationFilepath = Config.AssetBundle.Current.CompileAbsoluteAssetPath(UWB_Texturing.Config.CustomOrientation.CompileFilename());
        //    string customOrientationFilepath = UWB_Texturing.Config.CustomOrientation.CompileAbsoluteAssetPath(UWB_Texturing.Config.CustomOrientation.CompileFilename(), roomName);
        //    string unityMeshesRelativeDirectory = Config.AssetBundle.Current.AssetSubFolder;
        //    string materialsRelativeDirectory = Config.AssetBundle.Current.AssetSubFolder;
        //    if (File.Exists(customOrientationFilepath))
        //    {
        //        // Build room object
        //        string[] customOrientationFileLines = File.ReadAllLines(customOrientationFilepath);
        //        UWB_Texturing.RoomModel.BuildRoomObject(roomName, customOrientationFileLines, unityMeshesRelativeDirectory, materialsRelativeDirectory);
        //    }
        //    else
        //    {
        //        Debug.Log("Unable to build room!");
        //    }
        //    //UWB_Texturing.RoomModel.BuildRoomObject(File.ReadAllLines(Config.CustomOrientation.CompileAbsoluteAssetPath(Config.CustomOrientation.CompileFilename())));
        //}


        #region Instantiate
        public static void InstantiateRoom()
        {
            Config.Current.Room.SetFolders();
            string roomName = RoomManager.SyncRoomName();
            string rawResourceBundlePath = UWB_Texturing.Config.AssetBundle.RawPackage.CompileAbsoluteAssetPath(UWB_Texturing.Config.AssetBundle.RawPackage.CompileFilename(), roomName);

            UWB_Texturing.BundleHandler.InstantiateRoom(rawResourceBundlePath);
        }
Exemplo n.º 8
0
        public static void UnpackRoomBundle()
        {
            Config.Current.Room.SetFolders();
            string roomName       = RoomManager.SyncRoomName();
            string roomBundlePath = UWB_Texturing.Config.AssetBundle.RoomPackage.CompileAbsoluteAssetPath(UWB_Texturing.Config.AssetBundle.RoomPackage.CompileFilename(), roomName);

            UWB_Texturing.BundleHandler.UnpackFinalRoomTextureBundle(roomBundlePath);
        }
Exemplo n.º 9
0
 public static void RemoveAllEverything()
 {
     Config.Current.Room.SetFolders();
     RoomManager.SyncRoomName();
     UWB_Texturing.BundleHandler.RemoveAllRoomObjects();
     UWB_Texturing.BundleHandler.RemoveAllRoomResources();
     UWB_Texturing.BundleHandler.RemoveAllRawInfo();
 }
Exemplo n.º 10
0
 public static void UnpackAllRoomBundles()
 {
     Config.Current.Room.SetFolders();
     RoomManager.SyncRoomName();
     UWB_Texturing.BundleHandler.UnpackAllFinalRoomTextureBundles();
 }
Exemplo n.º 11
0
 public static void RemoveAllRoomPrefabs()
 {
     Config.Current.Room.SetFolders();
     RoomManager.SyncRoomName();
     UWB_Texturing.PrefabHandler.DeleteAllPrefabs();
 }
Exemplo n.º 12
0
 public static void InstantiateAllRoomPrefabs()
 {
     Config.Current.Room.SetFolders();
     RoomManager.SyncRoomName();
     UWB_Texturing.PrefabHandler.CreateAllRoomPrefabs();
 }