Skip to content

Commit

Permalink
fixed checking for Draco extension requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcDorn committed Jun 6, 2023
1 parent c2f8b60 commit 3a14d24
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ async Task CreateMaterials(MeshPrimitive primitive)
return;
}
#else
throw new NotSupportedException("Can't import model! Draco extension is needed. Please add com.atteneder.draco package to your project!");
if (mesh.Primitives.Any(p => p.Extensions != null && p.Extensions.ContainsKey("KHR_draco_mesh_compression")))
{
throw new NotSupportedException("Can't import model! Draco extension is needed. Please add com.atteneder.draco package to your project!");
}
#endif
cancellationToken.ThrowIfCancellationRequested();

Expand Down

0 comments on commit 3a14d24

Please sign in to comment.