MigrationVrmMeta.THUMBNAIL_NAME

This commit is contained in:
ousttrue 2021-09-07 15:08:31 +09:00
parent c365dd41fc
commit 4aca030dd5
2 changed files with 4 additions and 2 deletions

View File

@ -84,7 +84,7 @@ namespace UniVRM10
var name = TextureImportName.GetUnityObjectName(TextureImportTypes.sRGB, gltfImage.name, gltfImage.uri);
if (string.IsNullOrEmpty(name))
{
name = "thumbnail";
name = MigrationVrmMeta.THUMBNAIL_NAME;
}
GetTextureBytesAsync getThumbnailImageBytesAsync = () =>

View File

@ -27,6 +27,8 @@ namespace UniVRM10
// },
public static class MigrationVrmMeta
{
public const string THUMBNAIL_NAME = "__VRM10_thumbnail__";
public static UniGLTF.Extensions.VRMC_vrm.Meta Migrate(UniGLTF.glTF gltf, JsonNode vrm0)
{
var meta = new UniGLTF.Extensions.VRMC_vrm.Meta
@ -69,7 +71,7 @@ namespace UniVRM10
if (string.IsNullOrEmpty(gltfImage.name))
{
// fall back default name
gltfImage.name = "__VRM10_thumbnail__";
gltfImage.name = THUMBNAIL_NAME;
}
}
break;