mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-10-01 07:11:02 -05:00
VRMC_constraints to VRMC_node_constraint
This commit is contained in:
@@ -2,6 +2,8 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UniGLTF.JsonSchema
|
||||
{
|
||||
@@ -261,14 +263,21 @@ namespace UniGLTF.JsonSchema
|
||||
}
|
||||
}
|
||||
|
||||
public void Dump(string indent = "")
|
||||
public void Dump(StringBuilder sb, string indent = "")
|
||||
{
|
||||
Console.WriteLine($"{indent}{JsonPath}: {type}");
|
||||
sb.AppendLine($"{indent}{JsonPath}: {type}");
|
||||
|
||||
foreach (var x in Children())
|
||||
{
|
||||
x.Dump(indent + " ");
|
||||
x.Dump(sb, indent + " ");
|
||||
}
|
||||
}
|
||||
|
||||
public string Dump()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
Dump(sb);
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,15 +43,15 @@ namespace UniVRM10
|
||||
"vrm-specification/specification/VRMC_vrm-1.0_draft/schema/VRMC_vrm.schema.json",
|
||||
"Assets/VRM10/Runtime/Format/Vrm", // dst
|
||||
// VRMC_constraints
|
||||
"vrm-specification/specification/VRMC_constraints-1.0_draft/schema/VRMC_constraints.schema.json",
|
||||
"vrm-specification/specification/VRMC_node_constraint-1.0_draft/schema/VRMC_node_constraint.schema.json",
|
||||
"Assets/VRM10/Runtime/Format/Constraints", // dst
|
||||
//
|
||||
// VRMC_materials_mtoon
|
||||
"vrm-specification/specification/VRMC_materials_mtoon-1.0_draft/schema/VRMC_materials_mtoon.schema.json",
|
||||
"Assets/VRM10/Runtime/Format/MaterialsMToon", // dst
|
||||
//
|
||||
// VRMC_node_collider
|
||||
"vrm-specification/specification/VRMC_node_collider_1.0_draft/schema/VRMC_node_collider.json",
|
||||
"Assets/VRM10/Runtime/Format/NodeCollider", // dst
|
||||
//
|
||||
// VRMC_springBone
|
||||
"vrm-specification/specification/VRMC_springBone-1.0_draft/schema/VRMC_springBone.schema.json",
|
||||
"Assets/VRM10/Runtime/Format/SpringBone", // dst
|
||||
};
|
||||
@@ -61,15 +61,18 @@ namespace UniVRM10
|
||||
var extensionSchemaPath = new FileInfo(Path.Combine(projectRoot.FullName, args[i]));
|
||||
var parser = new UniGLTF.JsonSchema.JsonSchemaParser(gltf.Directory, extensionSchemaPath.Directory);
|
||||
var extensionSchema = parser.Load(extensionSchemaPath, "");
|
||||
if (debug)
|
||||
{
|
||||
extensionSchema.Dump();
|
||||
continue;
|
||||
}
|
||||
|
||||
var dst = new DirectoryInfo(Path.Combine(projectRoot.FullName, args[i + 1]));
|
||||
Debug.Log(dst);
|
||||
GenerateUniGLTFSerialization.Generator.GenerateTo(extensionSchema, dst, clearFolder: true);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Debug.Log(extensionSchema.Dump());
|
||||
}
|
||||
else
|
||||
{
|
||||
GenerateUniGLTFSerialization.Generator.GenerateTo(extensionSchema, dst, clearFolder: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user