From f0aedd454e0ed48b68096a670d692f026a62eff0 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 7 Sep 2021 15:00:11 +0900 Subject: [PATCH] fallback default name --- .../Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs b/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs index 53fa5b0d1..293fe0980 100644 --- a/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs +++ b/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs @@ -82,6 +82,10 @@ namespace UniVRM10 var imageIndex = vrm.Meta.ThumbnailImage.Value; var gltfImage = data.GLTF.images[imageIndex]; var name = TextureImportName.GetUnityObjectName(TextureImportTypes.sRGB, gltfImage.name, gltfImage.uri); + if (string.IsNullOrEmpty(name)) + { + name = "thumbnail"; + } GetTextureBytesAsync getThumbnailImageBytesAsync = () => {