diff --git a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollector.cs b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollector.cs index 3d23197..bdc683e 100644 --- a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollector.cs +++ b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollector.cs @@ -231,14 +231,12 @@ namespace YooAsset.Editor { foreach(var go in _allSpheres) { - var mat = go.GetComponent().sharedMaterial; - Resources.UnloadAsset(mat); GameObject.DestroyImmediate(go); } _allSpheres.Clear(); // 尝试释放编辑器加载的资源 - Resources.UnloadUnusedAssets(); + EditorUtility.UnloadUnusedAssetsImmediate(); } private static void CreateManifest() {