diff --git a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUtil.cs b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUtil.cs
index dfe6ac547..874d50b0e 100644
--- a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUtil.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUtil.cs
@@ -97,18 +97,38 @@ public static class GPGSUtil
/// Constant for token replacement
private const string CONSTANTSPLACEHOLDER = "__Constant_Properties__";
- ///
- /// The game info file path. This is a generated file.
- ///
- private const string GameInfoPath = "Assets/GooglePlayGames/GameInfo.cs";
-
- ///
- /// The manifest path.
- ///
- /// The Games SDK requires additional metadata in the AndroidManifest.xml
- /// file.
- private const string ManifestPath =
- "Assets/GooglePlayGames/Plugins/Android/GooglePlayGamesManifest.plugin/AndroidManifest.xml";
+ ///
+ /// The game info file path. This is a generated file.
+ ///
+ private static string GameInfoPath {
+ get {
+ return GooglePlayGamesRootDirectory + "GameInfo.cs";
+ }
+ }
+
+
+ ///
+ /// The manifest path.
+ ///
+ /// The Games SDK requires additional metadata in the AndroidManifest.xml
+ /// file.
+ private static string ManifestPath {
+ get {
+ return GooglePlayGamesRootDirectory + "Plugins/Android/GooglePlayGamesManifest.plugin/AndroidManifest.xml";
+ }
+ }
+
+
+ ///
+ /// The root directory of the plugin
+ ///
+ private static string GooglePlayGamesRootDirectory {
+ get {
+ string[] res = System.IO.Directory.GetFiles (Application.dataPath, "GPGSUtil.cs", SearchOption.AllDirectories);
+ string path = res [0].Replace ("Editor/GPGSUtil.cs", "").Replace ("\\", "/");
+ return path;
+ }
+ }
///
/// The map of replacements for filling in code templates. The
@@ -166,7 +186,7 @@ public static string ReadFile(string filePath)
/// Name of the template in the editor directory.
public static string ReadEditorTemplate(string name)
{
- return ReadFile(SlashesToPlatformSeparator("Assets/GooglePlayGames/Editor/" + name + ".txt"));
+ return ReadFile (SlashesToPlatformSeparator (GooglePlayGamesRootDirectory + "Editor/" + name + ".txt"));
}
///