fix ReadMeta

This commit is contained in:
ousttrue
2018-05-30 15:05:10 +09:00
parent 839f2ca0bb
commit 97a0e11613

View File

@@ -47,8 +47,14 @@ namespace VRM
meta.Reference = gltfMeta.reference;
meta.Title = gltfMeta.title;
if (createThumbnail)
if (gltfMeta.texture >= 0 && gltfMeta.texture < Textures.Count)
{
// ロード済み
meta.Thumbnail = Textures[gltfMeta.texture].Texture;
}
else if (createThumbnail)
{
// 作成する(先行ロード用)
if(gltfMeta.texture >= 0 && gltfMeta.texture < VRM.textures.Count)
{
var t = new TextureItem(VRM, gltfMeta.texture);