Closed thatcosmonaut closed 4 years ago
Yes, this is fine.
As stupid as it sounds, glTF specification allow primitives without a material being assigned to them.
So you always need to check for null before using the material. If you find a null material you must interpret it as a "default" material.
Well, that's unfortunate. Thanks for the clarification!
Hello, first off, thanks for the excellent library.
I am having an issue obtaining a reference to a material from a mesh primitive.
To reproduce:
myPrimitive.Material
will crash with the errorSystem.NullReferenceException: Object reference not set to an instance of an object