[MenuItem("KEngine/Symbol Link Resources/Link Builded Resource -> StreamingAssets or Resources")]
public static void SymbolLinkResource()
{
RemoveSymbolLinkResource();
var exportPath = GetResourceExportPath();
var linkPath = GetABLinkPath();
KSymbolLinkHelper.SymbolLinkFolder(exportPath, linkPath);
KSymbolLinkHelper.SymbolLinkFolder(KResourceModule.AppBasePath + AppConfig.LuaPath + "/", LuaLinkPath);
KSymbolLinkHelper.SymbolLinkFolder(KResourceModule.AppBasePath + AppConfig.SettingResourcesPath + "/", SettingLinkPath);
var dstPath = Application.streamingAssetsPath + "/" + AppConfig.VersionTxtName;
if (File.Exists(dstPath)) File.Delete(dstPath);
File.Copy(AppConfig.VersionTextPath, dstPath);
Log.Info($"拷贝version.txt完成,File.Exists:{File.Exists(dstPath)}");
AssetDatabase.Refresh();
}
[MenuItem("KEngine/Symbol Link Resources/Remove StreamingAssets or Resources links")]
public static void RemoveSymbolLinkResource()
{
if (!Directory.Exists(StreamingPath)) return;
KSymbolLinkHelper.DeleteLink(AssetBundlesLinkPath + "/" + KResourceModule.GetBuildPlatformName());
KSymbolLinkHelper.DeleteLink(LuaLinkPath);
KSymbolLinkHelper.DeleteLink(SettingLinkPath);
AssetDatabase.DeleteAsset(StreamingPath);
Debug.Log ("Remove Symbol LinkPath.");
AssetDatabase.Refresh();
}