Skip to content

Commit

Permalink
Merge pull request #2450 from ousttrue/version/v0_127_0
Browse files Browse the repository at this point in the history
UniVRM-0.127.0
  • Loading branch information
ousttrue authored Sep 27, 2024
2 parents 0e9020a + 4a070e5 commit d320f73
Show file tree
Hide file tree
Showing 8 changed files with 434 additions and 29 deletions.
4 changes: 2 additions & 2 deletions Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace UniGLTF
public static partial class PackageVersion
{
public const int MAJOR = 0;
public const int MINOR = 126;
public const int MINOR = 127;
public const int PATCH = 0;
public const string VERSION = "0.126.0";
public const string VERSION = "0.127.0";
}
}
4 changes: 2 additions & 2 deletions Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace UniGLTF
public static partial class UniGLTFVersion
{
public const int MAJOR = 2;
public const int MINOR = 62;
public const int MINOR = 63;
public const int PATCH = 0;
public const string VERSION = "2.62.0";
public const string VERSION = "2.63.0";
}
}
7 changes: 3 additions & 4 deletions Assets/UniGLTF/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.gltf",
"version": "0.126.0",
"version": "0.127.0",
"displayName": "UniGLTF",
"description": "GLTF importer and exporter",
"unity": "2021.3",
Expand All @@ -11,8 +11,7 @@
"name": "VRM Consortium"
},
"dependencies": {
"com.unity.modules.animation": "1.0.0",
"com.unity.test-framework": "1.0.0"
"com.unity.modules.animation": "1.0.0"
},
"samples": [
{
Expand All @@ -21,4 +20,4 @@
"path": "Samples~/GltfViewer"
}
]
}
}
30 changes: 14 additions & 16 deletions Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using UniGLTF;
using UniGLTF.SpringBoneJobs;
using UniHumanoid;
using Unity.Collections;
using UnityEngine;
using UnityEngine.UI;

Expand Down Expand Up @@ -267,6 +268,13 @@ public static bool TryGetFirstLoadable(out string cmd)
}
}

private void Awake()
{
#if DEBUG
NativeLeakDetection.Mode = NativeLeakDetectionMode.EnabledWithStackTrace;
#endif
}

private void Start()
{
m_version.text = string.Format("VRMViewer {0}.{1}",
Expand Down Expand Up @@ -382,23 +390,13 @@ public async Task LoadBytesAsync(string path, byte[] bytes)
}

// vrm
VrmUtility.MaterialGeneratorCallback materialCallback = (VRM.glTF_VRM_extensions vrm) => GetVrmMaterialGenerator(m_useUrpMaterial.isOn, vrm);
VrmUtility.MaterialGeneratorCallback materialCallback = (glTF_VRM_extensions vrm) => GetVrmMaterialGenerator(m_useUrpMaterial.isOn, vrm);
VrmUtility.MetaCallback metaCallback = m_texts.UpdateMeta;
var instance = await VrmUtility.LoadBytesAsync(path, bytes, GetIAwaitCaller(m_useAsync.isOn), materialCallback, metaCallback, loadAnimation: m_loadAnimation.isOn);

if (m_useFastSpringBone.isOn)
{
// job用バッファ作成
var buffer = await SpringBoneJobs.FastSpringBoneReplacer.MakeBufferAsync(instance.Root);

// 登録
SpringBoneJobs.FastSpringBoneService.Instance.BufferCombiner.Register(buffer);

// 削除登録
instance.Root.AddComponent<FastSpringBoneDisposer>()
.AddAction(()=>{ SpringBoneJobs.FastSpringBoneService.Instance.BufferCombiner.Unregister(buffer);})
.Add(buffer);
}
var instance = await VrmUtility.LoadBytesAsync(path, bytes, GetIAwaitCaller(m_useAsync.isOn),
materialCallback, metaCallback,
loadAnimation: m_loadAnimation.isOn,
springboneRuntime: m_useFastSpringBone.isOn ? new Vrm0XFastSpringboneRuntime() : new Vrm0XSpringBoneDefaultRuntime()
);

instance.EnableUpdateWhenOffscreen();
instance.ShowMeshes();
Expand Down
4 changes: 2 additions & 2 deletions Assets/VRM/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.univrm",
"version": "0.126.0",
"version": "0.127.0",
"displayName": "VRM",
"description": "VRM importer",
"unity": "2021.3",
Expand All @@ -14,7 +14,7 @@
"name": "VRM Consortium"
},
"dependencies": {
"com.vrmc.gltf": "0.126.0",
"com.vrmc.gltf": "0.127.0",
"com.unity.ugui": "1.0.0"
},
"samples": [
Expand Down
Loading

0 comments on commit d320f73

Please sign in to comment.