Esempio n. 1
0
    public static void DeleteLinkStreamingAssets()
    {
        string linkPath = Application.streamingAssetsPath + "/" + Utility.GetPlatformName();

        if (IsLinkStreamingAssets)
        {
            DeleteLink(linkPath);
            IsLinkStreamingAssets = false;
        }
        else
        {
            MyEditorTools.DeleteDir(linkPath);
        }
    }
Esempio n. 2
0
    /// <summary>
    /// 创建StreamingAssets链接
    /// </summary>
    public static void MkLinkStreamingAssets()
    {
        string linkPath = Application.streamingAssetsPath + "/" + Utility.GetPlatformName();

        if (IsLinkStreamingAssets)
        {
            MyEditorTools.CreateDir(Application.streamingAssetsPath);
            var exportPath = AppSetting.ExportResBaseDir + Utility.GetPlatformName();
            MyEditorTools.DeleteDir(linkPath);     //删除复制过来的文件夹
            SymbolLinkFolder(exportPath, linkPath);
        }
        else
        {
            DeleteLink(linkPath);
        }
        AssetDatabase.Refresh();
    }