浏览代码

Decorated generated code with AOT attributes

vpenades 2 年之前
父节点
当前提交
93db2dd792
共有 28 个文件被更改,包括 245 次插入1 次删除
  1. 7 1
      build/SharpGLTF.CodeGen/CodeGen/EmitCSharp.cs
  2. 4 0
      src/SharpGLTF.Cesium/Schema2/Generated/Ext.CESIUM_primitive_outline.g.cs
  3. 3 0
      src/SharpGLTF.Core/IO/JsonSerializable.cs
  4. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.AgiNodeArticulations.g.cs
  5. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.AgiNodeStkMetadata.g.cs
  6. 12 0
      src/SharpGLTF.Core/Schema2/Generated/ext.AgiRootArticulations.g.cs
  7. 8 0
      src/SharpGLTF.Core/Schema2/Generated/ext.AgiRootStkMetadata.g.cs
  8. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.ClearCoat.g.cs
  9. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.Ior.g.cs
  10. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.Iridescence.g.cs
  11. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.MSFT.TextureDDS.g.cs
  12. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.MaterialsEmissiveStrength.g.cs
  13. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.MaterialsVolume.g.cs
  14. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.MeshGpuInstancing.g.cs
  15. 12 0
      src/SharpGLTF.Core/Schema2/Generated/ext.ModelLightsPunctual.g.cs
  16. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.NodeLightsPunctual.g.cs
  17. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.Sheen.g.cs
  18. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.TextureKTX2.g.cs
  19. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.TextureTransform.g.cs
  20. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.TextureWEBP.g.cs
  21. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.Transmission.g.cs
  22. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.Unlit.g.cs
  23. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.XmpJsonLinkedData.Prop.g.cs
  24. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.XmpJsonLinkedData.Root.g.cs
  25. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.pbrSpecular.g.cs
  26. 4 0
      src/SharpGLTF.Core/Schema2/Generated/ext.pbrSpecularGlossiness.g.cs
  27. 116 0
      src/SharpGLTF.Core/Schema2/Generated/gltf.g.cs
  28. 3 0
      src/SharpGLTF.Core/Schema2/gltf.ExtensionsFactory.cs

+ 7 - 1
build/SharpGLTF.CodeGen/CodeGen/EmitCSharp.cs

@@ -618,7 +618,13 @@ namespace SharpGLTF.CodeGen
 
 
 
 
             foreach (var l in ClassSummary.EmitSummary(0)) yield return l;
             foreach (var l in ClassSummary.EmitSummary(0)) yield return l;
-            
+
+            yield return "#if NET6_0_OR_GREATER";
+            yield return "[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]";
+            yield return "#endif";
+
+            yield return "[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"SharpGLTF.CodeGen\", \"1.0.0.0\")]";
+
             yield return ClassDeclaration;
             yield return ClassDeclaration;
             yield return "{";
             yield return "{";
 
 

+ 4 - 0
src/SharpGLTF.Cesium/Schema2/Generated/Ext.CESIUM_primitive_outline.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension for indicating that some edges of a primitive's triangles should be outlined.
 	/// glTF extension for indicating that some edges of a primitive's triangles should be outlined.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class CesiumPrimitiveOutline : ExtraProperties
 	partial class CesiumPrimitiveOutline : ExtraProperties
 	{
 	{
 	
 	

+ 3 - 0
src/SharpGLTF.Core/IO/JsonSerializable.cs

@@ -559,6 +559,9 @@ namespace SharpGLTF.IO
 
 
             if (typeof(JsonSerializable).IsAssignableFrom(vtype))
             if (typeof(JsonSerializable).IsAssignableFrom(vtype))
             {
             {
+                // Instance creation on AOT compiled binaries depends on classes defining:
+                // [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+
                 var item = Activator.CreateInstance(vtype, true) as JsonSerializable;
                 var item = Activator.CreateInstance(vtype, true) as JsonSerializable;
 
 
                 // System.Diagnostics.Debug.Assert(reader.TokenType == JSONTOKEN.StartObject);
                 // System.Diagnostics.Debug.Assert(reader.TokenType == JSONTOKEN.StartObject);

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.AgiNodeArticulations.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF Extension for an individual node in a glTF model, to associate it with the model's root AGI_articulations object.
 	/// glTF Extension for an individual node in a glTF model, to associate it with the model's root AGI_articulations object.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AgiNodeArticulations : ExtraProperties
 	partial class AgiNodeArticulations : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.AgiNodeStkMetadata.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF Extension for an individual node in a glTF model, to associate it with the model's root AGI_stk_metadata object.
 	/// glTF Extension for an individual node in a glTF model, to associate it with the model's root AGI_stk_metadata object.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AgiNodeStkMetadata : ExtraProperties
 	partial class AgiNodeStkMetadata : ExtraProperties
 	{
 	{
 	
 	

+ 12 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.AgiRootArticulations.g.cs

@@ -48,6 +48,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// One stage of a model articulation definition.
 	/// One stage of a model articulation definition.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AgiArticulationStage : ExtraProperties
 	partial class AgiArticulationStage : ExtraProperties
 	{
 	{
 	
 	
@@ -90,6 +94,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A model articulation definition.
 	/// A model articulation definition.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AgiArticulation : ExtraProperties
 	partial class AgiArticulation : ExtraProperties
 	{
 	{
 	
 	
@@ -125,6 +133,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF Extension that defines metadata for applying external analysis or effects to a model.
 	/// glTF Extension that defines metadata for applying external analysis or effects to a model.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AgiRootArticulations : ExtraProperties
 	partial class AgiRootArticulations : ExtraProperties
 	{
 	{
 	
 	

+ 8 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.AgiRootStkMetadata.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A solar panel group definition.
 	/// A solar panel group definition.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AgiStkSolarPanelGroup : ExtraProperties
 	partial class AgiStkSolarPanelGroup : ExtraProperties
 	{
 	{
 	
 	
@@ -62,6 +66,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF Extension that defines metadata for use with STK (Systems Tool Kit).
 	/// glTF Extension that defines metadata for use with STK (Systems Tool Kit).
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AgiRootStkMetadata : ExtraProperties
 	partial class AgiRootStkMetadata : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.ClearCoat.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the clearcoat material layer.
 	/// glTF extension that defines the clearcoat material layer.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialClearCoat : ExtraProperties
 	partial class MaterialClearCoat : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.Ior.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the index of refraction of a material.
 	/// glTF extension that defines the index of refraction of a material.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialIOR : ExtraProperties
 	partial class MaterialIOR : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.Iridescence.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines an iridescence effect.
 	/// glTF extension that defines an iridescence effect.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialIridescence : ExtraProperties
 	partial class MaterialIridescence : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.MSFT.TextureDDS.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension to specify textures using the DirectDraw Surface file format (DDS).
 	/// glTF extension to specify textures using the DirectDraw Surface file format (DDS).
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class TextureDDS : ExtraProperties
 	partial class TextureDDS : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.MaterialsEmissiveStrength.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that adjusts the strength of emissive material properties.
 	/// glTF extension that adjusts the strength of emissive material properties.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialEmissiveStrength : ExtraProperties
 	partial class MaterialEmissiveStrength : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.MaterialsVolume.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the parameters for the volume of a material.
 	/// glTF extension that defines the parameters for the volume of a material.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialVolume : ExtraProperties
 	partial class MaterialVolume : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.MeshGpuInstancing.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension defines instance attributes for a node with a mesh.
 	/// glTF extension defines instance attributes for a node with a mesh.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MeshGpuInstancing : ExtraProperties
 	partial class MeshGpuInstancing : ExtraProperties
 	{
 	{
 	
 	

+ 12 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.ModelLightsPunctual.g.cs

@@ -27,6 +27,10 @@ namespace SharpGLTF.Schema2
 {
 {
 	using Collections;
 	using Collections;
 
 
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class PunctualLightSpot : ExtraProperties
 	partial class PunctualLightSpot : ExtraProperties
 	{
 	{
 	
 	
@@ -63,6 +67,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A directional, point, or spot light.
 	/// A directional, point, or spot light.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class PunctualLight : LogicalChildOfRoot
 	partial class PunctualLight : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -106,6 +114,10 @@ namespace SharpGLTF.Schema2
 	
 	
 	}
 	}
 
 
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class _ModelPunctualLights : ExtraProperties
 	partial class _ModelPunctualLights : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.NodeLightsPunctual.g.cs

@@ -27,6 +27,10 @@ namespace SharpGLTF.Schema2
 {
 {
 	using Collections;
 	using Collections;
 
 
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class _NodePunctualLight : ExtraProperties
 	partial class _NodePunctualLight : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.Sheen.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the sheen material model.
 	/// glTF extension that defines the sheen material model.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialSheen : ExtraProperties
 	partial class MaterialSheen : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.TextureKTX2.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension to specify textures using the KTX v2 images with Basis Universal supercompression.
 	/// glTF extension to specify textures using the KTX v2 images with Basis Universal supercompression.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class TextureKTX2 : ExtraProperties
 	partial class TextureKTX2 : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.TextureTransform.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that enables shifting and scaling UV coordinates on a per-texture basis
 	/// glTF extension that enables shifting and scaling UV coordinates on a per-texture basis
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class TextureTransform : ExtraProperties
 	partial class TextureTransform : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.TextureWEBP.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension to specify textures using the WebP image format.
 	/// glTF extension to specify textures using the WebP image format.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class TextureWEBP : ExtraProperties
 	partial class TextureWEBP : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.Transmission.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the optical transmission of a material.
 	/// glTF extension that defines the optical transmission of a material.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialTransmission : ExtraProperties
 	partial class MaterialTransmission : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.Unlit.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the unlit material model.
 	/// glTF extension that defines the unlit material model.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialUnlit : ExtraProperties
 	partial class MaterialUnlit : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.XmpJsonLinkedData.Prop.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// References an XMP packet listed in `KHR_xmp_json_ld glTF extension`
 	/// References an XMP packet listed in `KHR_xmp_json_ld glTF extension`
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class XmpPacketReference : ExtraProperties
 	partial class XmpPacketReference : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.XmpJsonLinkedData.Root.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Metadata about the glTF asset.
 	/// Metadata about the glTF asset.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class XmpPackets : ExtraProperties
 	partial class XmpPackets : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.pbrSpecular.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the strength of the specular reflection.
 	/// glTF extension that defines the strength of the specular reflection.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialSpecular : ExtraProperties
 	partial class MaterialSpecular : ExtraProperties
 	{
 	{
 	
 	

+ 4 - 0
src/SharpGLTF.Core/Schema2/Generated/ext.pbrSpecularGlossiness.g.cs

@@ -30,6 +30,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// glTF extension that defines the specular-glossiness material model from Physically-Based Rendering (PBR) methodology.
 	/// glTF extension that defines the specular-glossiness material model from Physically-Based Rendering (PBR) methodology.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialPBRSpecularGlossiness : ExtraProperties
 	partial class MaterialPBRSpecularGlossiness : ExtraProperties
 	{
 	{
 	
 	

+ 116 - 0
src/SharpGLTF.Core/Schema2/Generated/gltf.g.cs

@@ -174,6 +174,10 @@ namespace SharpGLTF.Schema2
 	}
 	}
 
 
 
 
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class LogicalChildOfRoot : ExtraProperties
 	partial class LogicalChildOfRoot : ExtraProperties
 	{
 	{
 	
 	
@@ -200,6 +204,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// An object pointing to a buffer view containing the indices of deviating accessor values. The number of indices is equal to `accessor.sparse.count`. Indices **MUST** strictly increase.
 	/// An object pointing to a buffer view containing the indices of deviating accessor values. The number of indices is equal to `accessor.sparse.count`. Indices **MUST** strictly increase.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AccessorSparseIndices : ExtraProperties
 	partial class AccessorSparseIndices : ExtraProperties
 	{
 	{
 	
 	
@@ -236,6 +244,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// An object pointing to a buffer view containing the deviating accessor values. The number of elements is equal to `accessor.sparse.count` times number of components. The elements have the same component type as the base accessor. The elements are tightly packed. Data **MUST** be aligned following the same rules as the base accessor.
 	/// An object pointing to a buffer view containing the deviating accessor values. The number of elements is equal to `accessor.sparse.count` times number of components. The elements have the same component type as the base accessor. The elements are tightly packed. Data **MUST** be aligned following the same rules as the base accessor.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AccessorSparseValues : ExtraProperties
 	partial class AccessorSparseValues : ExtraProperties
 	{
 	{
 	
 	
@@ -268,6 +280,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Sparse storage of accessor values that deviate from their initialization value.
 	/// Sparse storage of accessor values that deviate from their initialization value.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AccessorSparse : ExtraProperties
 	partial class AccessorSparse : ExtraProperties
 	{
 	{
 	
 	
@@ -303,6 +319,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A typed view into a buffer view that contains raw binary data.
 	/// A typed view into a buffer view that contains raw binary data.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Accessor : LogicalChildOfRoot
 	partial class Accessor : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -369,6 +389,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// The descriptor of the animated property.
 	/// The descriptor of the animated property.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AnimationChannelTarget : ExtraProperties
 	partial class AnimationChannelTarget : ExtraProperties
 	{
 	{
 	
 	
@@ -399,6 +423,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// An animation channel combines an animation sampler with a target property being animated.
 	/// An animation channel combines an animation sampler with a target property being animated.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AnimationChannel : ExtraProperties
 	partial class AnimationChannel : ExtraProperties
 	{
 	{
 	
 	
@@ -429,6 +457,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm.
 	/// An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class AnimationSampler : ExtraProperties
 	partial class AnimationSampler : ExtraProperties
 	{
 	{
 	
 	
@@ -464,6 +496,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A keyframe animation.
 	/// A keyframe animation.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Animation : LogicalChildOfRoot
 	partial class Animation : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -496,6 +532,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Metadata about the glTF asset.
 	/// Metadata about the glTF asset.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Asset : ExtraProperties
 	partial class Asset : ExtraProperties
 	{
 	{
 	
 	
@@ -534,6 +574,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A buffer points to binary geometry, animation, or skins.
 	/// A buffer points to binary geometry, animation, or skins.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Buffer : LogicalChildOfRoot
 	partial class Buffer : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -565,6 +609,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A view into a buffer generally representing a subset of the buffer.
 	/// A view into a buffer generally representing a subset of the buffer.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class BufferView : LogicalChildOfRoot
 	partial class BufferView : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -612,6 +660,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// An orthographic camera containing properties to create an orthographic projection matrix.
 	/// An orthographic camera containing properties to create an orthographic projection matrix.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class CameraOrthographic : ExtraProperties
 	partial class CameraOrthographic : ExtraProperties
 	{
 	{
 	
 	
@@ -652,6 +704,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A perspective camera containing properties to create a perspective projection matrix.
 	/// A perspective camera containing properties to create a perspective projection matrix.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class CameraPerspective : ExtraProperties
 	partial class CameraPerspective : ExtraProperties
 	{
 	{
 	
 	
@@ -695,6 +751,10 @@ namespace SharpGLTF.Schema2
 	/// A camera's projection.
 	/// A camera's projection.
 	/// A node **MAY** reference a camera to apply a transform to place the camera in the scene.
 	/// A node **MAY** reference a camera to apply a transform to place the camera in the scene.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Camera : LogicalChildOfRoot
 	partial class Camera : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -729,6 +789,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Reference to a texture.
 	/// Reference to a texture.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class TextureInfo : ExtraProperties
 	partial class TextureInfo : ExtraProperties
 	{
 	{
 	
 	
@@ -761,6 +825,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
 	/// A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialPBRMetallicRoughness : ExtraProperties
 	partial class MaterialPBRMetallicRoughness : ExtraProperties
 	{
 	{
 	
 	
@@ -807,6 +875,10 @@ namespace SharpGLTF.Schema2
 	
 	
 	}
 	}
 
 
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialNormalTextureInfo : TextureInfo
 	partial class MaterialNormalTextureInfo : TextureInfo
 	{
 	{
 	
 	
@@ -831,6 +903,10 @@ namespace SharpGLTF.Schema2
 	
 	
 	}
 	}
 
 
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MaterialOcclusionTextureInfo : TextureInfo
 	partial class MaterialOcclusionTextureInfo : TextureInfo
 	{
 	{
 	
 	
@@ -860,6 +936,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// The material appearance of a primitive.
 	/// The material appearance of a primitive.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Material : LogicalChildOfRoot
 	partial class Material : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -919,6 +999,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Geometry to be rendered with the given material.
 	/// Geometry to be rendered with the given material.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class MeshPrimitive : ExtraProperties
 	partial class MeshPrimitive : ExtraProperties
 	{
 	{
 	
 	
@@ -964,6 +1048,10 @@ namespace SharpGLTF.Schema2
 	/// A set of primitives to be rendered.
 	/// A set of primitives to be rendered.
 	/// Its global transform is defined by a node that references it.
 	/// Its global transform is defined by a node that references it.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Mesh : LogicalChildOfRoot
 	partial class Mesh : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -998,6 +1086,10 @@ namespace SharpGLTF.Schema2
 	/// When the node contains `skin`, all `mesh.primitives` **MUST** contain `JOINTS_0` and `WEIGHTS_0` attributes.
 	/// When the node contains `skin`, all `mesh.primitives` **MUST** contain `JOINTS_0` and `WEIGHTS_0` attributes.
 	/// A node **MAY** have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), `matrix` **MUST NOT** be present.
 	/// A node **MAY** have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), `matrix` **MUST NOT** be present.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Node : LogicalChildOfRoot
 	partial class Node : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -1058,6 +1150,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Texture sampler properties for filtering and wrapping modes.
 	/// Texture sampler properties for filtering and wrapping modes.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class TextureSampler : LogicalChildOfRoot
 	partial class TextureSampler : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -1098,6 +1194,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// The root nodes of a scene.
 	/// The root nodes of a scene.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Scene : LogicalChildOfRoot
 	partial class Scene : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -1125,6 +1225,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Joints and matrices defining a skin.
 	/// Joints and matrices defining a skin.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Skin : LogicalChildOfRoot
 	partial class Skin : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -1160,6 +1264,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// A texture and its sampler.
 	/// A texture and its sampler.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Texture : LogicalChildOfRoot
 	partial class Texture : LogicalChildOfRoot
 	{
 	{
 	
 	
@@ -1190,6 +1298,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// The root object for a glTF asset.
 	/// The root object for a glTF asset.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class ModelRoot : ExtraProperties
 	partial class ModelRoot : ExtraProperties
 	{
 	{
 	
 	
@@ -1295,6 +1407,10 @@ namespace SharpGLTF.Schema2
 	/// <summary>
 	/// <summary>
 	/// Image data used to create a texture. Image **MAY** be referenced by an URI (or IRI) or a buffer view index.
 	/// Image data used to create a texture. Image **MAY** be referenced by an URI (or IRI) or a buffer view index.
 	/// </summary>
 	/// </summary>
+	#if NET6_0_OR_GREATER
+	[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+	#endif
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")]
 	partial class Image : LogicalChildOfRoot
 	partial class Image : LogicalChildOfRoot
 	{
 	{
 	
 	

+ 3 - 0
src/SharpGLTF.Core/Schema2/gltf.ExtensionsFactory.cs

@@ -108,6 +108,9 @@ namespace SharpGLTF.Schema2
 
 
             if (name == null) return null;
             if (name == null) return null;
 
 
+            // Instance creation on AOT compiled binaries depends on classes defining:
+            // [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
+
             var instance = Activator.CreateInstance
             var instance = Activator.CreateInstance
                 (
                 (
                 extType,
                 extType,