mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-09 12:29:23 -05:00
Add experimental expoter option. Enable error checks for glTF
This commit is contained in:
@@ -503,7 +503,8 @@ namespace UniGLTF
|
||||
string json;
|
||||
if (UseUniJSONSerializer)
|
||||
{
|
||||
json = JsonSchema.FromType(GetType()).Serialize(this);
|
||||
var c = new JsonSchemaValidationContext(this);
|
||||
json = JsonSchema.FromType(GetType()).Serialize(this, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace VRM
|
||||
|
||||
public bool PoseFreeze = true;
|
||||
|
||||
public bool UseExperimentalExporter = true;
|
||||
|
||||
public IEnumerable<string> CanExport()
|
||||
{
|
||||
if (Source == null)
|
||||
@@ -250,7 +252,7 @@ namespace VRM
|
||||
}
|
||||
|
||||
void Export(string path, List<GameObject> destroy)
|
||||
{
|
||||
{
|
||||
var target = Source;
|
||||
if (IsPrefab(target))
|
||||
{
|
||||
@@ -277,7 +279,7 @@ namespace VRM
|
||||
vrm.extensions.VRM.meta.title = Title;
|
||||
vrm.extensions.VRM.meta.author = Author;
|
||||
|
||||
var bytes = vrm.ToGlbBytes();
|
||||
var bytes = vrm.ToGlbBytes(UseExperimentalExporter);
|
||||
File.WriteAllBytes(path, bytes);
|
||||
Debug.LogFormat("Export elapsed {0}", sw.Elapsed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user