UniVRM version to gltf.asset.generator

This commit is contained in:
ousttrue
2018-04-12 21:30:22 +09:00
parent 0802e15399
commit 392ec0e03f
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ namespace VRM
public static glTF Export(GameObject go, string path = null, Action<glTF_VRM> callback=null)
{
var gltf = new glTF_VRM();
gltf.asset.generator = "Unity VRM Exporter";
gltf.asset.generator = string.Format("UniVRM-{0}.{1}", VRMVersion.MAJOR, VRMVersion.MINOR);
using (var exporter = new VRMExporter(gltf))
{
_Export(gltf, exporter, go);

View File

@@ -8,7 +8,9 @@ namespace VRM
[Serializable]
public class glTF_VRM_extensions : JsonSerializableBase
{
[Obsolete("use gltf.asset.generator")]
public string version = VRMVersion.VERSION;
public glTF_VRM_Meta meta = new glTF_VRM_Meta();
public glTF_VRM_Humanoid humanoid = new glTF_VRM_Humanoid();
public glTF_VRM_Firstperson firstPerson = new glTF_VRM_Firstperson();
@@ -18,7 +20,7 @@ namespace VRM
protected override void SerializeMembers(JsonFormatter f)
{
f.KeyValue(() => version);
//f.KeyValue(() => version);
f.KeyValue(() => meta);
f.KeyValue(() => humanoid);
f.KeyValue(() => firstPerson);