This commit is contained in:
monitor1394
2022-03-27 12:49:20 +08:00
parent 3bccbd0ab2
commit acba2f5c1e
17 changed files with 111 additions and 119 deletions

View File

@@ -109,24 +109,20 @@ namespace XCharts.Runtime
packagePath = Path.GetFullPath("Assets/..");
if (Directory.Exists(packagePath))
{
// Search default location for development package
if (File.Exists(packagePath + "/Assets/Packages/com.monitor1394.xcharts/package.json"))
if (File.Exists(packagePath + "/Assets/Packages/XCharts/package.json"))
{
return packagePath + "/Assets/Packages/com.monitor1394.xcharts";
return packagePath + "/Assets/Packages/XCharts";
}
// Search for default location of normal XCharts AssetStore package
if (File.Exists(packagePath + "/Assets/XCharts/package.json"))
{
return packagePath + "/Assets/XCharts";
}
// Search for potential alternative locations in the user project
string[] matchingPaths = Directory.GetDirectories(packagePath, "XCharts", SearchOption.AllDirectories);
string path = ValidateLocation(matchingPaths, packagePath);
if (path != null) return Path.Combine(packagePath, path);
}
return null;
}
@@ -141,7 +137,6 @@ namespace XCharts.Runtime
return folderPath;
}
}
return null;
}