From 700773f2a97c9ab28e48f8705aafd376f4ec51de Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 16 Mar 2021 14:52:33 +0900 Subject: [PATCH] =?UTF-8?q?m=5FtextureCache=20=E3=81=AE=E3=82=AD=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E9=87=8D=E8=A4=87=E3=81=97=E3=81=AA=E3=81=84=E3=81=8B?= =?UTF-8?q?=E7=A2=BA=E8=AA=8D=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Runtime/UniGLTF/IO/TextureLoader/TextureFactory.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/TextureFactory.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/TextureFactory.cs index b695d701f..de8a409f1 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/TextureFactory.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureLoader/TextureFactory.cs @@ -59,7 +59,10 @@ namespace UniGLTF if (m_externalMap.TryGetValue(cacheName, out external)) { - m_textureCache.Add(cacheName, new TextureLoadInfo(external, used, true)); + if (!m_textureCache.ContainsKey(cacheName)) + { + m_textureCache.Add(cacheName, new TextureLoadInfo(external, used, true)); + } return external; } }