From cbe645c921cdb189e20d4f50ba0d05a97e2b6a47 Mon Sep 17 00:00:00 2001 From: hirose Date: Thu, 26 Dec 2019 14:17:20 +0900 Subject: [PATCH] fix generate code --- .../VRM/UniGLTF/Editor/Serialization/SerializerGenerator.cs | 4 ++++ Assets/VRM/UniGLTF/Scripts/IO/FormatterExtensionsGltf.g.cs | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Assets/VRM/UniGLTF/Editor/Serialization/SerializerGenerator.cs b/Assets/VRM/UniGLTF/Editor/Serialization/SerializerGenerator.cs index b0da0f38ad..fbde882251 100644 --- a/Assets/VRM/UniGLTF/Editor/Serialization/SerializerGenerator.cs +++ b/Assets/VRM/UniGLTF/Editor/Serialization/SerializerGenerator.cs @@ -253,6 +253,10 @@ public static void GenSerialize(this IFormatter f, $0 value) if (fi.FieldType == typeof(string) || fi.FieldType.IsEnum || fi.FieldType.IsArray || fi.FieldType.IsGenericType) { + } + else if(fi.FieldType == typeof(glTF_KHR_materials_unlit)) + { + } else if (fi.FieldType.IsClass && fi.FieldType.GetFields(FIELD_FLAGS).Length == 0) { diff --git a/Assets/VRM/UniGLTF/Scripts/IO/FormatterExtensionsGltf.g.cs b/Assets/VRM/UniGLTF/Scripts/IO/FormatterExtensionsGltf.g.cs index e1174d3470..bec719f4c7 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/FormatterExtensionsGltf.g.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/FormatterExtensionsGltf.g.cs @@ -728,6 +728,11 @@ public static void GenSerialize(this IFormatter f, glTFMaterial_extensions value { f.BeginMap(0); // dummy + if(value.KHR_materials_unlit!=null) + { + f.Key("KHR_materials_unlit"); f.GenSerialize(value.KHR_materials_unlit); + } + f.EndMap(); }