From 4130bc97c7e0dfd7dcace90ed86deaba94ffb190 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Tue, 28 Jan 2025 01:29:12 +0900 Subject: [PATCH] fix: Update README.txt path for macOS build process Add platform-specific path handling for README.txt in macOS builds, complementing the existing Windows build path logic --- Assets/uDesktopMascot/Scripts/Menu/MenuPresenter.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Assets/uDesktopMascot/Scripts/Menu/MenuPresenter.cs b/Assets/uDesktopMascot/Scripts/Menu/MenuPresenter.cs index 6a33220e..7123bb57 100644 --- a/Assets/uDesktopMascot/Scripts/Menu/MenuPresenter.cs +++ b/Assets/uDesktopMascot/Scripts/Menu/MenuPresenter.cs @@ -213,10 +213,14 @@ private void OpenHelp() #if UNITY_EDITOR // Unity Editorでは、Assetsフォルダ内のパスを使用 path = Path.Combine(Application.dataPath, "uDesktopMascot/Document/README.txt"); -#else - // ビルド後のアプリケーションでは、ビルドフォルダのルートへのパスを取得 - string rootPath = Directory.GetParent(Application.dataPath).FullName; - path = Path.Combine(rootPath, "README.txt"); +#elif UNITY_EDITOR_WIN + // ビルド後のアプリケーションでは、ビルドフォルダのルートへのパスを取得 + string rootPath = Directory.GetParent(Application.dataPath).FullName; + path = Path.Combine(rootPath, "README.txt"); +#elif UNITY_EDITOR_OSX + // ビルド後のアプリケーションでは、ビルドフォルダのルートへのパスを取得 + string rootPath = Directory.GetParent(Application.dataPath).FullName; + path = Path.Combine(rootPath, "Contents", "Resources", "README.txt"); #endif // パスをログに出力