From 1cd4c3d951d1a91358bf8173b5004211503d4e94 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 20 Apr 2021 13:50:36 +0900 Subject: [PATCH] remove targetPath.ImportAsset. use EditorApplication.delayCall --- .../Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs index 8883b85d1..3ec448ba4 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs @@ -66,7 +66,7 @@ namespace UniGLTF var (_, subAsset) = m_subAssets.FirstOrDefault(x => x.Equals(key)); targetPath = m_textureDirectory.Child($"{key.Name}.png"); File.WriteAllBytes(targetPath.FullPath, subAsset.EncodeToPNG().ToArray()); - targetPath.ImportAsset(); + // targetPath.ImportAsset(); break; } @@ -75,7 +75,7 @@ namespace UniGLTF // write original bytes targetPath = m_textureDirectory.Child($"{key.Name}{param.Ext}"); File.WriteAllBytes(targetPath.FullPath, param.Index0().Result.ToArray()); - targetPath.ImportAsset(); + // targetPath.ImportAsset(); break; } }