Skip to content
This repository has been archived by the owner on Jun 24, 2019. It is now read-only.

Commit

Permalink
Add the default value for primitive mode in the GLTF schema.
Browse files Browse the repository at this point in the history
This fixes "Cannot create mesh" errors during asset import.
  • Loading branch information
anokta committed Oct 8, 2018
1 parent 13854da commit 6a11f4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/PolyToolkit/Internal/GltfSchemaCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 6a11f4a

@benhylak
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch! resolved my import problems.

Please sign in to comment.