Ignore null

This commit is contained in:
Masataka SUMI 2021-05-25 16:47:16 +09:00
parent 34e5e4689c
commit 76582ebcf3
2 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,7 @@ namespace UniGLTF
// 2 回目以降の Asset Import において、 Importer の設定で Extract した UnityEngine.Object が入る
var extractedObjects = scriptedImporter.GetExternalObjectMap()
.Where(x => x.Value != null)
.ToDictionary(kv => new SubAssetKey(kv.Value.GetType(), kv.Value.name), kv => kv.Value);
using (var loader = new ImporterContext(parser, extractedObjects))

View File

@ -78,6 +78,7 @@ namespace VRM
//
var map = texturePaths
.Select(x => x.LoadAsset<Texture2D>())
.Where(x => x != null)
.ToDictionary(x => new SubAssetKey(x), x => x as Object);
using (var context = new VRMImporterContext(parser, map))