We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86efc85 commit 6364c01Copy full SHA for 6364c01
1 file changed
Core/Helpers/GltfUtil.cs
@@ -132,6 +132,11 @@ public static List<GltfEntry<T>> FromGltfModel<T>(ModelRoot model)
132
133
public static (Stream?, Stream?) ExtractCubemapStreams(ModelRoot model)
134
{
135
+ if (model.LogicalMaterials.Count < 1)
136
+ {
137
+ return default;
138
+ }
139
+
140
var material = model.LogicalMaterials[0];
141
var albedoChannel = material.FindChannel("BaseColor");
142
var emissionChannel = material.FindChannel("Emissive");
0 commit comments