Пример #1
0
        public static void SymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(AssetBundlesLinkPath);
            var exportPath = GetResourceExportPath();
            var linkPath   = GetABLinkPath();

            KSymbolLinkHelper.SymbolLinkFolder(exportPath, linkPath);
            //NOTE 特别无解,同步下无法link这两个目录,使用协程处理后目录内容是空,如果2018及以下版本无EditorCoroutine使用脚本进行link

            /*Log.Info("Add Symbol Link Assetbundle.");
             * ins = new object();
             * EditorCoroutineUtility.StartCoroutine(LinkLua(), ins);
             * Log.Info("Add Symbol Link Lua.");
             * EditorCoroutineUtility.StartCoroutine(LinkSettings(), ins);
             * Log.Info("Add Symbol Link Settings.");*/

            var linkFile = Application.dataPath + "/../AssetLink.sh";

            if (System.Environment.OSVersion.ToString().Contains("Windows"))
            {
                linkFile = Application.dataPath + "/../AssetLink.bat";
            }
            KEditorUtils.ExecuteFile(linkFile);
            AssetDatabase.Refresh();
        }
Пример #2
0
        public static void SymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(AssetBundlesLinkPath);
            var exportPath = GetResourceExportPath();
            var linkPath   = GetABLinkPath();

            KSymbolLinkHelper.SymbolLinkFolder(exportPath, linkPath);
            //NOTE 特别无解,无法同步link这两个目录,使用协程处理后目录内容是空,如果2018及以下版本无EditorCoroutine使用脚本进行link

            /*Log.Info("Add Symbol Link Assetbundle.");
             * ins = new object();
             * EditorCoroutineUtility.StartCoroutine(LinkLua(), ins);
             * Log.Info("Add Symbol Link Lua.");
             * EditorCoroutineUtility.StartCoroutine(LinkSettings(), ins);
             * Log.Info("Add Symbol Link Settings.");*/

            var linkFile = Application.dataPath + "/../AssetLink.sh";

            if (System.Environment.OSVersion.ToString().Contains("Windows"))
            {
                linkFile = Application.dataPath + "/../AssetLink.bat";
            }
            KTool.ExecuteFile(linkFile);
            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();
        }
Пример #3
0
        public static void RemoveSymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(ResourcesSymbolLinkHelper.AssetBundlesLinkPath);
            Debug.Log("Remove " + ResourcesSymbolLinkHelper.AssetBundlesLinkPath);

            AssetDatabase.DeleteAsset(ResourcesSymbolLinkHelper.AssetBundlesLinkPath);

            AssetDatabase.Refresh();
        }
Пример #4
0
        public static void SymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(ResourcesSymbolLinkHelper.AssetBundlesLinkPath);

            var exportPath = GetResourceExportPath();
            var linkPath   = GetLinkPath();

            KSymbolLinkHelper.SymbolLinkFolder(exportPath, linkPath);

            AssetDatabase.Refresh();
        }
Пример #5
0
        public static void RemoveSymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(AssetBundlesLinkPath);
            AssetDatabase.DeleteAsset(AssetBundlesLinkPath);

            KSymbolLinkHelper.DeleteAllLinks(LuaLinkPath);
            KSymbolLinkHelper.DeleteAllLinks(SettingLinkPath);

            Debug.Log("Remove Symbol LinkPath.");
            AssetDatabase.Refresh();
        }
Пример #6
0
        public static void LinkToLuaToBundleResource()
        {
            KSymbolLinkHelper.DeleteAllLinks("Assets/BundleResources/BuildByDir/ToLua/");
            KSymbolLinkHelper.DeleteAllLinks("Assets/BundleResources/BuildByDir/ToLua/Lua");

            var exportPath = "Assets/ToLua/Lua";
            var linkPath   = "Assets/BundleResources/BuildByDir/ToLua/Lua";

            KSymbolLinkHelper.SymbolLinkFolder(exportPath, linkPath);

            AssetDatabase.Refresh();
        }
Пример #7
0
        private static IEnumerator LinkSettings()
        {
            KSymbolLinkHelper.DeleteAllLinks(SettingLinkPath);
            yield return(new WaitForSeconds(1.0f));

            var exportPath = KResourceModule.ProductPathWithoutFileProtocol + AppConfig.SettingResourcesPath + "/";

            if (!Directory.Exists(SettingLinkPath))
            {
                Directory.CreateDirectory(SettingLinkPath);
            }
            KSymbolLinkHelper.SymbolLinkFolder(exportPath, SettingLinkPath);
        }
Пример #8
0
        private static IEnumerator LinkLua()
        {
            KSymbolLinkHelper.DeleteAllLinks(LuaLinkPath);
            yield return(new WaitForSeconds(1.0f));

            var exportPath = KResourceModule.AppBasePath + AppConfig.LuaPath + "/";

            if (!Directory.Exists(LuaLinkPath))
            {
                Directory.CreateDirectory(LuaLinkPath);
            }
            KSymbolLinkHelper.SymbolLinkFolder(exportPath, LuaLinkPath);
        }
Пример #9
0
        public static void RemoveSymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(ResourcesSymbolLinkHelper.AssetBundlesLinkPath);
            AssetDatabase.DeleteAsset(ResourcesSymbolLinkHelper.AssetBundlesLinkPath);

            /*KSymbolLinkHelper.DeleteAllLinks(ResourcesSymbolLinkHelper.LuaLinkPath);
             * AssetDatabase.DeleteAsset(ResourcesSymbolLinkHelper.LuaLinkPath);
             *
             * KSymbolLinkHelper.DeleteAllLinks(ResourcesSymbolLinkHelper.SettingLinkPath);
             * AssetDatabase.DeleteAsset(ResourcesSymbolLinkHelper.SettingLinkPath);*/

            Debug.Log("Remove Symbol LinkPath.");
            AssetDatabase.Refresh();
        }
Пример #10
0
        public static void RemoveSymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(AssetBundlesLinkPath);
            AssetDatabase.DeleteAsset(AssetBundlesLinkPath);

            KSymbolLinkHelper.DeleteAllLinks(LuaLinkPath);
            KSymbolLinkHelper.DeleteAllLinks(SettingLinkPath);
            var dstPath = Application.streamingAssetsPath + $"/{AppConfig.VersionTxtName}";

            if (File.Exists(dstPath))
            {
                File.Delete(dstPath);
            }
            Debug.Log("Remove Symbol LinkPath.");
            AssetDatabase.Refresh();
        }
Пример #11
0
        public static void SymbolLinkResource()
        {
            KSymbolLinkHelper.DeleteAllLinks(AssetBundlesLinkPath);
            var exportPath = GetResourceExportPath();
            var linkPath   = GetABLinkPath();

            KSymbolLinkHelper.SymbolLinkFolder(exportPath, linkPath);
            //NOTE 特别无解,无法link这两个目录

            /*KSymbolLinkHelper.DeleteAllLinks(LuaLinkPath);
             * exportPath = KResourceModule.ProductPathWithoutFileProtocol + AppConfig.LuaPath + "/";
             * if (!Directory.Exists(LuaLinkPath)) Directory.CreateDirectory(LuaLinkPath);
             * KSymbolLinkHelper.SymbolLinkFolder(exportPath, LuaLinkPath);
             *
             * KSymbolLinkHelper.DeleteAllLinks(SettingLinkPath);
             * exportPath = KResourceModule.ProductPathWithoutFileProtocol + AppConfig.SettingResourcesPath + "/";
             * if (!Directory.Exists(SettingLinkPath)) Directory.CreateDirectory(SettingLinkPath);
             * KSymbolLinkHelper.SymbolLinkFolder(exportPath, SettingLinkPath);*/
            Debug.Log("Add Symbol LinkPath.");
            AssetDatabase.Refresh();
        }