diff --git a/Docs/AssetBuilder.md b/Docs/AssetBundleBuilder.md similarity index 100% rename from Docs/AssetBuilder.md rename to Docs/AssetBundleBuilder.md diff --git a/Docs/AssetCollector.md b/Docs/AssetBundleCollector.md similarity index 100% rename from Docs/AssetCollector.md rename to Docs/AssetBundleCollector.md diff --git a/Docs/AssetDebugger.md b/Docs/AssetBundleDebugger.md similarity index 100% rename from Docs/AssetDebugger.md rename to Docs/AssetBundleDebugger.md diff --git a/Docs/AssetDeploy.md b/Docs/AssetBundleDeployer.md similarity index 100% rename from Docs/AssetDeploy.md rename to Docs/AssetBundleDeployer.md diff --git a/Docs/AssetReporter.md b/Docs/AssetBundleReporter.md similarity index 100% rename from Docs/AssetReporter.md rename to Docs/AssetBundleReporter.md diff --git a/Docs/Settings.md b/Docs/GlobalSettings.md similarity index 100% rename from Docs/Settings.md rename to Docs/GlobalSettings.md diff --git a/Docs/Image/ShaderVariantCollector-img1.png b/Docs/Image/ShaderVariantCollector-img1.png new file mode 100644 index 0000000..df43c90 Binary files /dev/null and b/Docs/Image/ShaderVariantCollector-img1.png differ diff --git a/Docs/ShaderVariantCollector.md b/Docs/ShaderVariantCollector.md new file mode 100644 index 0000000..83ac5ce --- /dev/null +++ b/Docs/ShaderVariantCollector.md @@ -0,0 +1,37 @@ +# 着色器变种收集 + +![image](https://github.com/tuyoogame/YooAsset/raw/main/Docs/Image/ShaderVariantCollector-img1.jpg) + +点击搜集变种按钮开始收集,请耐心等待结束。 + +### Jenkins支持 + +```c# +public static void CollectSVC() +{ + string savePath = ShaderVariantCollectorSettingData.Setting.SavePath; + ShaderVariantCollector.OnCompletedCallback = () => + { + ShaderVariantCollection collection = + AssetDatabase.LoadAssetAtPath(savePath); + if (collection != null) + { + Debug.Log($"ShaderCount : {collection.shaderCount}"); + Debug.Log($"VariantCount : {collection.variantCount}"); + } + else + { + throw new Exception("Failed to Collect shader Variants."); + } + + EditorTools.CloseUnityGameWindow(); + EditorApplication.Exit(0); + }; + ShaderVariantCollector.Run(savePath); +} +``` + +```c# +// 命令行调用 +%Projects_UnityEngine_Path% -batchmode -projectPath %Projects_UnityProject_Path% -executeMethod ET.CIHelper.CollectSVC -logFile %Projects_UnityProject_Path%/Logs/CIBuildSVC.log +``` diff --git a/README.md b/README.md index dfcf59c..5109279 100644 --- a/README.md +++ b/README.md @@ -47,12 +47,12 @@ ## 入门教程 1. [快速开始](https://github.com/tuyoogame/YooAsset/blob/master/Docs/QuickStart.md) -2. [全局配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/Settings.md) -3. [资源配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetCollector.md) -4. [资源打包](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBuilder.md) -5. [资源部署](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetDeploy.md) -5. [构建报告](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetReporter.md) -5. [调试器](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetDebugger.md) +2. [全局配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/GlobalSettings.md) +3. [资源配置](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBundleCollector.md) +4. [资源打包](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBundleBuilder.md) +5. [资源部署](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBundleDeployer.md) +5. [构建报告](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBundleReporter.md) +5. [调试器](https://github.com/tuyoogame/YooAsset/blob/master/Docs/AssetBundleDebugger.md) 5. [常见问题](https://github.com/tuyoogame/YooAsset/blob/master/Docs/FAQ.md) ## 代码教程