Skip to content

Commit

Permalink
fix: Proper error log when editor import failed
Browse files Browse the repository at this point in the history
  • Loading branch information
atteneder committed May 17, 2021
1 parent ae7d638 commit 00b80d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Editor/DracoImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public override async void OnImportAsset(AssetImportContext ctx) {
var dracoData = File.ReadAllBytes(ctx.assetPath);
var draco = new DracoMeshLoader();
var mesh = await draco.ConvertDracoMeshToUnity(dracoData, sync: true);
if (mesh == null) {
Debug.LogError("Import draco file failed");
return;
}
ctx.AddObjectToAsset("mesh", mesh);
ctx.SetMainObject(mesh);
}
Expand Down

0 comments on commit 00b80d7

Please sign in to comment.