Skip to content

Commit

Permalink
fix: Update README.txt path for macOS build process
Browse files Browse the repository at this point in the history
Add platform-specific path handling for README.txt in macOS builds, complementing the existing Windows build path logic
  • Loading branch information
eiei114 committed Jan 27, 2025
1 parent 542cd1c commit 4130bc9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Assets/uDesktopMascot/Scripts/Menu/MenuPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

// パスをログに出力
Expand Down

0 comments on commit 4130bc9

Please sign in to comment.