remove targetPath.ImportAsset. use EditorApplication.delayCall

This commit is contained in:
ousttrue
2021-04-20 13:50:36 +09:00
parent 1cee06e83e
commit 1cd4c3d951

View File

@@ -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;
}
}