mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-11 04:54:17 -05:00
Add experimental expoter option. Enable error checks for glTF
This commit is contained in:
parent
8479c7c9b2
commit
da2f7b8490
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user