Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace GooglePlayGames.Editor
using System.Collections.Generic;
using System.IO;
using System.Xml;
using System.Linq;
using UnityEditor;
using UnityEngine;

Expand Down Expand Up @@ -108,7 +109,7 @@ public static class GPGSUtil
/// <remarks>The Games SDK requires additional metadata in the AndroidManifest.xml
/// file. </remarks>
private const string ManifestRelativePath =
"../../Plugins/Android/GooglePlayGamesManifest.androidlib/AndroidManifest.xml";
"Plugins/Android/GooglePlayGamesManifest.androidlib/AndroidManifest.xml";

private const string RootFolderName = "com.google.play.games";

Expand Down Expand Up @@ -187,7 +188,17 @@ private static string GameInfoPath
/// file. </remarks>
private static string ManifestPath
{
get { return SlashesToPlatformSeparator(Path.Combine(RootPath, ManifestRelativePath)); }
get
{
bool isInAssetsDir = RootPath.Split(Path.DirectorySeparatorChar)
.Contains("Assets");

string manifestPath = isInAssetsDir
? Path.Combine(RootPath, "../../", ManifestRelativePath)
: Path.Combine(Application.dataPath, ManifestRelativePath);

return SlashesToPlatformSeparator(manifestPath);
}
}

/// <summary>
Expand Down