From ede961fa31725cdc3fc28a88fe13d18f8bad2c72 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sun, 14 Jan 2024 21:47:48 -0500 Subject: [PATCH] prod flag fixes --- Assets/Scripts/GlobalGameManager.cs | 2 +- Assets/Scripts/TitleManager.cs | 17 +++++++++++++++++ README.md | 1 - 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/GlobalGameManager.cs b/Assets/Scripts/GlobalGameManager.cs index 9e7f4d92..80a63fec 100644 --- a/Assets/Scripts/GlobalGameManager.cs +++ b/Assets/Scripts/GlobalGameManager.cs @@ -128,7 +128,7 @@ namespace HeavenStudio } ChangeMasterVolume(PersistentDataManager.gameSettings.masterVolume); PlayerInput.InitInputControllers(); -#if HEAVENSTUDIO_PROD +#if HEAVENSTUDIO_PROD && !UNITY_EDITOR Starpelly.OS.ChangeWindowTitle("Heaven Studio"); buildTime = Application.buildGUID.Substring(0, 8) + " " + AppInfo.Date.ToString("dd/MM/yyyy hh:mm:ss"); #elif UNITY_EDITOR diff --git a/Assets/Scripts/TitleManager.cs b/Assets/Scripts/TitleManager.cs index 59b2199f..bed13f77 100644 --- a/Assets/Scripts/TitleManager.cs +++ b/Assets/Scripts/TitleManager.cs @@ -503,7 +503,24 @@ namespace HeavenStudio new ExtensionFilter("Heaven Studio Remix File ", new string[] { "riq" }), }; +#if HEAVENSTUDIO_PROD && !UNITY_EDITOR + string lvpath = Application.dataPath; + if (Application.platform == RuntimePlatform.OSXPlayer) + { + lvpath += "/../../Levels/"; + } + else + { + lvpath += "/../Levels/"; + } + if (!Directory.Exists(lvpath)) + { + Directory.CreateDirectory(lvpath); + } + StandaloneFileBrowser.OpenFilePanelAsync("Open Remix", lvpath, extensions, false, (string[] paths) => +#else StandaloneFileBrowser.OpenFilePanelAsync("Open Remix", "", extensions, false, (string[] paths) => +#endif { var path = Path.Combine(paths); if (path == string.Empty) diff --git a/README.md b/README.md index 151a72f3..d335f6a7 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,6 @@ These builds include experimental new features that will not be included in Rele #### Important Notes: - On MacOS and Linux builds you may [experience bugs with audio-related tasks](https://github.com/RHeavenStudio/HeavenStudio/issues/72), but in most cases Heaven Studio works perfectly. -- On MacOS you'll need to have Discord open in the background for now, there's a bug that causes the DiscordSDK library to crash when the rich presence is updated while Discord is not open in the background. ## Self-Building