From 138140a75d18f046b0a00277c0b56c77375aa954 Mon Sep 17 00:00:00 2001 From: momoandbanana Date: Sun, 15 Nov 2020 20:40:30 +0900 Subject: [PATCH] fix cast error --- Assets/VRM/UniGLTF/Scripts/IO/TextureIO.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/VRM/UniGLTF/Scripts/IO/TextureIO.cs b/Assets/VRM/UniGLTF/Scripts/IO/TextureIO.cs index bf1fc890a..99515c8f8 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/TextureIO.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/TextureIO.cs @@ -123,7 +123,7 @@ namespace UniGLTF var path = UnityPath.FromAsset(texture); if (path.IsUnderAssetsFolder) { - var textureImporter = (TextureImporter) AssetImporter.GetAtPath(path.Value); + var textureImporter = AssetImporter.GetAtPath(path.Value) as TextureImporter; var getSizeMethod = typeof(TextureImporter).GetMethod("GetWidthAndHeight", BindingFlags.NonPublic | BindingFlags.Instance); if (textureImporter != null && getSizeMethod != null) {