update shader variant collector

pull/62/head
hevinci 2023-02-02 10:05:20 +08:00
parent 3672a7e1fa
commit 03abac082c
1 changed files with 1 additions and 3 deletions

View File

@ -231,14 +231,12 @@ namespace YooAsset.Editor
{ {
foreach(var go in _allSpheres) foreach(var go in _allSpheres)
{ {
var mat = go.GetComponent<Renderer>().sharedMaterial;
Resources.UnloadAsset(mat);
GameObject.DestroyImmediate(go); GameObject.DestroyImmediate(go);
} }
_allSpheres.Clear(); _allSpheres.Clear();
// 尝试释放编辑器加载的资源 // 尝试释放编辑器加载的资源
Resources.UnloadUnusedAssets(); EditorUtility.UnloadUnusedAssetsImmediate();
} }
private static void CreateManifest() private static void CreateManifest()
{ {