Merge pull request #786 from ousttrue/fix/texture_import

fix runtime texture import
This commit is contained in:
PoChang007 2021-03-16 15:02:15 +09:00 committed by GitHub
commit 4a040da8e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}