diff --git a/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs b/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs
index 4df14e4aaf..b2139ccfe6 100644
--- a/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs
+++ b/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs
@@ -4,8 +4,8 @@ namespace UniGLTF
public static partial class UniGLTFVersion
{
public const int MAJOR = 2;
- public const int MINOR = 4;
- public const int PATCH = 2;
- public const string VERSION = "2.4.2";
+ public const int MINOR = 5;
+ public const int PATCH = 0;
+ public const string VERSION = "2.5.0";
}
}
diff --git a/Assets/UniGLTF/package.json b/Assets/UniGLTF/package.json
index 0e2a84cbcf..1bd77253e6 100644
--- a/Assets/UniGLTF/package.json
+++ b/Assets/UniGLTF/package.json
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.unigltf",
- "version": "2.4.2",
+ "version": "2.5.0",
"displayName": "UniGLTF",
"description": "GLTF importer and exporter",
"unity": "2018.4",
@@ -11,6 +11,6 @@
"name": "VRM Consortium"
},
"dependencies": {
- "com.vrmc.vrmshaders": "0.68.2"
+ "com.vrmc.vrmshaders": "0.69.0"
}
}
\ No newline at end of file
diff --git a/Assets/VRM/Editor/Format/VRMVersionMenu.cs b/Assets/VRM/Editor/Format/VRMVersionMenu.cs
index a660ed0d6e..99b36469b0 100644
--- a/Assets/VRM/Editor/Format/VRMVersionMenu.cs
+++ b/Assets/VRM/Editor/Format/VRMVersionMenu.cs
@@ -3,9 +3,20 @@
using UnityEditor;
using UnityEngine;
using UniGLTF;
+using System;
namespace VRM
{
+ ///
+ /// VersionDialog
+ ///
+ /// UniGLTFVersion は、 VRMVersion から自動的に決まる。
+ ///
+ /// Major = 2
+ /// Minor = VRMVersion.MINOR - 64
+ /// Patch = VRMVersion.PATCH
+ ///
+ ///
public class VRMVersionMenu : EditorWindow
{
///
@@ -120,30 +131,50 @@ public UpmPackage(string name, string path, string template)
[SerializeField]
string m_vrmVersion;
- [SerializeField]
- string m_uniGltfVersion;
+ (int, int, int) m_uniGltfVersion
+ {
+ get
+ {
+ if (TryGetVersion(m_vrmVersion, out (int, int, int) vrmVersion))
+ {
+ return (2, vrmVersion.Item2 - 64, vrmVersion.Item3);
+ }
+ else
+ {
+ return (0, 0, 0);
+ }
+ }
+ }
static bool TryGetVersion(string src, out (int, int, int) version)
{
- if (string.IsNullOrEmpty(src))
+ try
{
- version = default;
- return false;
- }
+ if (string.IsNullOrEmpty(src))
+ {
+ version = default;
+ return false;
+ }
- var splitted = src.Split('.');
- if (splitted.Length != 3)
+ var splitted = src.Split('.');
+ if (splitted.Length != 3)
+ {
+ version = default;
+ return false;
+ }
+
+ version = (
+ int.Parse(splitted[0]),
+ int.Parse(splitted[1]),
+ int.Parse(splitted[2])
+ );
+ return true;
+ }
+ catch (Exception)
{
version = default;
return false;
}
-
- version = (
- int.Parse(splitted[0]),
- int.Parse(splitted[1]),
- int.Parse(splitted[2])
- );
- return true;
}
///
@@ -158,24 +189,22 @@ void OnGUI()
GUILayout.Label("UniGLTF");
GUILayout.Label($"Current version: {UniGLTFVersion.VERSION}");
- m_uniGltfVersion = EditorGUILayout.TextField("Major.Minor.Patch", m_uniGltfVersion);
+ {
+ var enabled = GUI.enabled;
+ GUI.enabled = false;
+ EditorGUILayout.TextField("Major.Minor.Patch", $"{m_uniGltfVersion}");
+ GUI.enabled = enabled;
+ }
GUILayout.Space(30);
if (GUILayout.Button("Apply"))
{
if (TryGetVersion(m_vrmVersion, out (int, int, int) vrmVersion))
{
- if (TryGetVersion(m_uniGltfVersion, out (int, int, int) uniGltfVersion))
- {
- UpdateVrmVersion(uniGltfVersion, vrmVersion);
- UpdateUniGLTFVersion(uniGltfVersion, vrmVersion);
- AssetDatabase.Refresh();
- Debug.Log($"{uniGltfVersion}, {vrmVersion}");
- }
- else
- {
- Debug.LogWarning($"InvalidFormat: {m_uniGltfVersion}");
- }
+ UpdateVrmVersion(m_uniGltfVersion, vrmVersion);
+ UpdateUniGLTFVersion(m_uniGltfVersion, vrmVersion);
+ AssetDatabase.Refresh();
+ Debug.Log($"{m_uniGltfVersion}, {vrmVersion}");
}
else
{
@@ -228,7 +257,7 @@ static void ShowVersionDialog()
{
var window = ScriptableObject.CreateInstance();
window.m_vrmVersion = VRMVersion.VERSION;
- window.m_uniGltfVersion = UniGLTFVersion.VERSION;
+ // window.m_uniGltfVersion = UniGLTFVersion.VERSION;
window.ShowUtility();
}
}
diff --git a/Assets/VRM/Runtime/Format/VRMVersion.cs b/Assets/VRM/Runtime/Format/VRMVersion.cs
index 51b40aaf1c..4038466b3f 100644
--- a/Assets/VRM/Runtime/Format/VRMVersion.cs
+++ b/Assets/VRM/Runtime/Format/VRMVersion.cs
@@ -4,8 +4,8 @@ namespace VRM
public static partial class VRMVersion
{
public const int MAJOR = 0;
- public const int MINOR = 68;
- public const int PATCH = 2;
- public const string VERSION = "0.68.2";
+ public const int MINOR = 69;
+ public const int PATCH = 0;
+ public const string VERSION = "0.69.0";
}
}
diff --git a/Assets/VRM/package.json b/Assets/VRM/package.json
index 8144ed576a..e0e51fbf3a 100644
--- a/Assets/VRM/package.json
+++ b/Assets/VRM/package.json
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.univrm",
- "version": "0.68.2",
+ "version": "0.69.0",
"displayName": "VRM",
"description": "VRM importer",
"unity": "2018.4",
@@ -14,7 +14,7 @@
"name": "VRM Consortium"
},
"dependencies": {
- "com.vrmc.vrmshaders": "0.68.2",
- "com.vrmc.unigltf": "2.4.2"
+ "com.vrmc.vrmshaders": "0.69.0",
+ "com.vrmc.unigltf": "2.5.0"
}
}
diff --git a/Assets/VRMShaders/package.json b/Assets/VRMShaders/package.json
index a7452d77c1..ca76783594 100644
--- a/Assets/VRMShaders/package.json
+++ b/Assets/VRMShaders/package.json
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.vrmshaders",
- "version": "0.68.2",
+ "version": "0.69.0",
"displayName": "VRM Shaders",
"description": "VRM Shaders",
"unity": "2018.4",