From 9d4bc2a1a8c9d602d48b4619df6bf7638a974e24 Mon Sep 17 00:00:00 2001 From: tsgcpp <19503967+tsgcpp@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:30:47 +0900 Subject: [PATCH] fix: Dispose texture caches of TextureFactory --- .../GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs b/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs index f197b4faf..e4590d546 100644 --- a/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs +++ b/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/TextureFactory.cs @@ -36,6 +36,10 @@ namespace VRMShaders public void Dispose() { + foreach (var (k, v) in _textureCache) + { + UnityObjectDestroyer.DestroyRuntimeOrEditor(v); + } _textureCache.Clear(); }