-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GLTFSerialization building after recent merges
- Loading branch information
1 parent
aa265e4
commit bac31f3
Showing
8 changed files
with
251 additions
and
88 deletions.
There are no files selected for viewing
33 changes: 19 additions & 14 deletions
33
GLTFSerialization/GLTFSerialization/Extensions/KHR_materials_unlitExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
using GLTF.Math; | ||
using GLTF.Schema; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace GLTF.Schema | ||
{ | ||
/// <summary> | ||
/// glTF extension that defines the unlit material model | ||
/// | ||
/// This extension defines an unlit shading model for use in glTF 2.0 materials, as an alternative to the Physically Based Rendering (PBR) shading models provided by the core specification. | ||
/// | ||
/// Spec can be found here: | ||
/// https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit | ||
/// </summary> | ||
public class KHR_materials_unlitExtension : IExtension | ||
public class KHR_MaterialsUnlitExtension : GLTFProperty, IExtension | ||
{ | ||
public KHR_materials_unlitExtension() { } | ||
public KHR_MaterialsUnlitExtension() { } | ||
|
||
public KHR_MaterialsUnlitExtension(KHR_MaterialsUnlitExtension ext, GLTFRoot root) : base(ext, root) { } | ||
|
||
public IExtension Clone(GLTFRoot gltfRoot) | ||
{ | ||
return new KHR_materials_unlitExtension(); | ||
return new KHR_MaterialsUnlitExtension(this, gltfRoot); | ||
} | ||
|
||
public JProperty Serialize() | ||
override public void Serialize(JsonWriter writer) | ||
{ | ||
JProperty jProperty = | ||
new JProperty(KHR_materials_unlitExtensionFactory.EXTENSION_NAME, | ||
new JObject() | ||
); | ||
writer.WritePropertyName(KHR_MaterialsUnlitExtensionFactory.EXTENSION_NAME); | ||
writer.WriteStartObject(); | ||
base.Serialize(writer); | ||
writer.WriteEndObject(); | ||
} | ||
|
||
return jProperty; | ||
public JProperty Serialize() | ||
{ | ||
JTokenWriter writer = new JTokenWriter(); | ||
Serialize(writer); | ||
return (JProperty)writer.Token; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.