diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureImporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureImporter.cs
index 753cecb1a..659288f37 100644
--- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureImporter.cs
+++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureImporter.cs
@@ -31,7 +31,7 @@ namespace UniGLTF
() =>
{
var imageBytes = data.GetBytesFromImage(imageIndex);
- return Task.FromResult<(byte[], string)?>((ToArray(imageBytes?.binary ?? default), null));
+ return Task.FromResult<(byte[], string)?>((ToArray(imageBytes?.binary ?? default), imageBytes?.mimeType));
},
default, default, default, default, default);
return (texDesc.SubAssetKey, texDesc);
diff --git a/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs b/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs
index b6e55d56c..7a6db9e79 100644
--- a/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs
+++ b/Assets/VRM10/Runtime/IO/Texture/Vrm10TextureDescriptorGenerator.cs
@@ -10,6 +10,8 @@ namespace UniVRM10
{
public sealed class Vrm10TextureDescriptorGenerator : ITextureDescriptorGenerator
{
+ public const string UniqueThumbnailName = "thumbnail__VRM10";
+
private readonly GltfData m_data;
private TextureDescriptorSet _textureDescriptorSet;
@@ -69,8 +71,6 @@ namespace UniVRM10
}
}
- public const string THUMBNAIL_NAME = "__VRM10_thumbnail__";
-
///
/// VRM-1 の thumbnail テクスチャー。gltf.textures ではなく gltf.images の参照であることに注意(sampler等の設定が無い)
///
@@ -99,12 +99,7 @@ namespace UniVRM10
// data.GLTF.textures は前処理によりユニーク性がある
// unique な名前を振り出す
var used = new HashSet(data.GLTF.textures.Select(x => x.name));
- var imageName = gltfImage.name;
- if (string.IsNullOrEmpty(imageName))
- {
- imageName = THUMBNAIL_NAME;
- }
- var uniqueName = GlbLowLevelParser.FixNameUnique(used, imageName);
+ var uniqueName = GlbLowLevelParser.FixNameUnique(used, UniqueThumbnailName);
value = GltfTextureImporter.CreateSrgbFromOnlyImage(data, imageIndex, uniqueName, gltfImage.uri);
return true;
diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/UnityTextureDeserializer.cs b/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/UnityTextureDeserializer.cs
index 2d5a1b174..14ce16d55 100644
--- a/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/UnityTextureDeserializer.cs
+++ b/Assets/VRMShaders/GLTF/IO/Runtime/Texture/Importer/UnityTextureDeserializer.cs
@@ -18,7 +18,14 @@ namespace VRMShaders
case "image/jpeg":
break;
default:
- Debug.LogWarning($"Texture image MIME type `{textureInfo.DataMimeType}` is not supported.");
+ if (string.IsNullOrEmpty(textureInfo.DataMimeType))
+ {
+ Debug.Log($"Texture image MIME type is empty.");
+ }
+ else
+ {
+ Debug.Log($"Texture image MIME type `{textureInfo.DataMimeType}` is not supported.");
+ }
break;
}