diff --git a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorSetting.cs b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorSetting.cs index 320a4c7..658cb1a 100644 --- a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorSetting.cs +++ b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorSetting.cs @@ -13,5 +13,10 @@ namespace YooAsset.Editor /// 收集的包裹名称 /// public string CollectPackage = string.Empty; + + /// + /// 容器值 + /// + public int ProcessCapacity = 1000; } } \ No newline at end of file diff --git a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs index edc7966..4da2565 100644 --- a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs +++ b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs @@ -24,6 +24,7 @@ namespace YooAsset.Editor private TextField _collectOutputField; private Label _currentShaderCountField; private Label _currentVariantCountField; + private SliderInt _processCapacitySlider; private PopupField _packageField; public void CreateGUI() @@ -72,6 +73,23 @@ namespace YooAsset.Editor packageContainer.Add(_packageField); } + // 容器值 + _processCapacitySlider = root.Q("ProcessCapacity"); + _processCapacitySlider.SetValueWithoutNotify(ShaderVariantCollectorSettingData.Setting.ProcessCapacity); +#if !UNITY_2020_3_OR_NEWER + _processCapacitySlider.label = $"Capacity ({_processCapacitySlider.value})"; + _processCapacitySlider.RegisterValueChangedCallback(evt => + { + ShaderVariantCollectorSettingData.Setting.ProcessCapacity = _processCapacitySlider.value; + _processCapacitySlider.label = $"Capacity ({_processCapacitySlider.value})"; + }); +#else + _processCapacitySlider.RegisterValueChangedCallback(evt => + { + ShaderVariantCollectorSettingData.Setting.ProcessCapacity = _processCapacitySlider.value; + }); +#endif + _currentShaderCountField = root.Q