From 6a11f4aa264f6161f39730ffdc5068f2fb58e726 Mon Sep 17 00:00:00 2001 From: Alper Gungormusler Date: Mon, 8 Oct 2018 15:25:31 -0400 Subject: [PATCH] Add the default value for primitive mode in the GLTF schema. This fixes "Cannot create mesh" errors during asset import. --- Assets/PolyToolkit/Internal/GltfSchemaCommon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/PolyToolkit/Internal/GltfSchemaCommon.cs b/Assets/PolyToolkit/Internal/GltfSchemaCommon.cs index bd340b8..97a381a 100644 --- a/Assets/PolyToolkit/Internal/GltfSchemaCommon.cs +++ b/Assets/PolyToolkit/Internal/GltfSchemaCommon.cs @@ -200,7 +200,7 @@ public abstract class GltfBufferViewBase { public abstract class GltfPrimitiveBase { [Serializable] public enum Mode { TRIANGLES = 4 } - public Mode mode; + public Mode mode = Mode.TRIANGLES; // Not part of the schema; this is for lazy-creation convenience // There may be more than one if the gltf primitive is too big for Unity