public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) { string pathToPlayerData = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), Path.GetFileNameWithoutExtension(pathToBuiltProject) + "_Data"); string pathToPlayerDataMiddleVR = Path.Combine(pathToPlayerData, "MiddleVR"); // Copy web assets string webAssetsPathSource = Path.Combine(Path.Combine(Application.dataPath, "MiddleVR"), "WebAssets"); if (Directory.Exists(webAssetsPathSource)) { // The player executable file and the data folder share the same base name string webAssetsPathDestination = Path.Combine(pathToPlayerDataMiddleVR, "WebAssets"); FileSystemTools.DirectoryCopy(webAssetsPathSource, webAssetsPathDestination, true, true); } // Copy web assets in hidden directory string dotWebAssetsPathSource = Path.Combine(Path.Combine(Application.dataPath, "MiddleVR"), ".WebAssets"); if (Directory.Exists(dotWebAssetsPathSource)) { // The player executable file and the data folder share the same base name string dotWebAssetsPathDestination = Path.Combine(pathToPlayerDataMiddleVR, ".WebAssets"); FileSystemTools.DirectoryCopy(dotWebAssetsPathSource, dotWebAssetsPathDestination, true, true); } // Sign Application MVRTools.SignApplication(pathToBuiltProject); }
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) { string renderingPlugin32Path = pathToBuiltProject.Replace(".exe", "_Data/Plugins/MiddleVR_UnityRendering.dll"); string renderingPlugin64Path = pathToBuiltProject.Replace(".exe", "_Data/Plugins/MiddleVR_UnityRendering_x64.dll"); switch (target) { case BuildTarget.StandaloneWindows: { Debug.Log("[ ] 32-bit build : delete " + renderingPlugin64Path); // Delete x64 version if (System.IO.File.Exists(renderingPlugin64Path)) { System.IO.File.Delete(renderingPlugin64Path); } break; } case BuildTarget.StandaloneWindows64: { Debug.Log("[ ] 64-bit build : delete " + renderingPlugin32Path + " and rename " + renderingPlugin64Path); // Delete 32b version... if (System.IO.File.Exists(renderingPlugin32Path)) { System.IO.File.Delete(renderingPlugin32Path); } // ...and rename x64 version if (System.IO.File.Exists(renderingPlugin64Path)) { System.IO.File.Move(renderingPlugin64Path, renderingPlugin32Path); } break; } } // Copy web assets for HTML5 default GUI string webAssetsPathSource = Application.dataPath + System.IO.Path.DirectorySeparatorChar + "/MiddleVR/.WebAssets"; string webAssetsPathDestination = pathToBuiltProject.Replace(".exe", "_Data/MiddleVR/.WebAssets"); FileSystemTools.DirectoryCopy(webAssetsPathSource, webAssetsPathDestination, true, true); // Sign Application MVRTools.SignApplication(pathToBuiltProject); }
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) { string pathToSourceData = Application.dataPath; string pathToPlayerData = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), Path.GetFileNameWithoutExtension(pathToBuiltProject) + "_Data"); CopyFolderIfExists("WebAssets", pathToSourceData, pathToPlayerData); // Copy web assets CopyFolderIfExists(".WebAssets", pathToSourceData, pathToPlayerData); // Copy web assets in hidden directory string pathToSourceDataMiddleVR = Path.Combine(pathToSourceData, "MiddleVR"); string pathToPlayerDataMiddleVR = Path.Combine(pathToPlayerData, "MiddleVR"); CopyFolderIfExists("WebAssets", pathToSourceDataMiddleVR, pathToPlayerDataMiddleVR); // Copy web assets CopyFolderIfExists(".WebAssets", pathToSourceDataMiddleVR, pathToPlayerDataMiddleVR); // Copy web assets in hidden directory // Sign Application MVRTools.SignApplication(pathToBuiltProject); }
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) { string pathToSourceData = Application.dataPath; string pathToPlayerData = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), Path.GetFileNameWithoutExtension(pathToBuiltProject) + "_Data"); CopyFolderIfExists("WebAssets", pathToSourceData, pathToPlayerData); // Copy web assets CopyFolderIfExists(".WebAssets", pathToSourceData, pathToPlayerData); // Copy web assets in hidden directory string pathToSourceDataMiddleVR = Path.Combine(pathToSourceData, "MiddleVR"); string pathToPlayerDataMiddleVR = Path.Combine(pathToPlayerData, "MiddleVR"); CopyFolderIfExists("WebAssets", pathToSourceDataMiddleVR, pathToPlayerDataMiddleVR); // Copy web assets CopyFolderIfExists(".WebAssets", pathToSourceDataMiddleVR, pathToPlayerDataMiddleVR); // Copy web assets in hidden directory string pathToPlayerAssemblyCSharp = Path.Combine(Path.Combine(pathToPlayerData, "Managed"), "Assembly-CSharp.dll"); //UnityEngine.Networking.AssemblyPostProcessor.Process(pathToPlayerAssemblyCSharp); // Sign Application MVRTools.SignApplication(pathToBuiltProject); }