diff --git a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersion.cs b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs similarity index 78% rename from Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersion.cs rename to Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs index 43108c8fc..a4cedba3c 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersion.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs @@ -1,7 +1,7 @@ namespace UniGLTF { - public static partial class UniVrmPackageVersion + public static partial class PackageVersion { public const int MAJOR = 0; public const int MINOR = 115; diff --git a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersion.cs.meta b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs.meta similarity index 83% rename from Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersion.cs.meta rename to Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs.meta index 4e7c8cfb1..d61dbbf3b 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersion.cs.meta +++ b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4769e8b6530fee0459f0b415a1444ed8 +guid: ab81045d7751d4040b553ecbac5ab9e4 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersionPartial.cs b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersionPartial.cs similarity index 98% rename from Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersionPartial.cs rename to Assets/UniGLTF/Runtime/UniGLTF/PackageVersionPartial.cs index 254f6faaf..513826f1e 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersionPartial.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersionPartial.cs @@ -3,7 +3,7 @@ using System.Text.RegularExpressions; namespace UniGLTF { - public static partial class UniVrmPackageVersion + public static partial class PackageVersion { /// /// Returns true if a passed version is newer than current UniVRM. diff --git a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersionPartial.cs.meta b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersionPartial.cs.meta similarity index 83% rename from Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersionPartial.cs.meta rename to Assets/UniGLTF/Runtime/UniGLTF/PackageVersionPartial.cs.meta index aa06a7686..ce011769d 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersionPartial.cs.meta +++ b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersionPartial.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ae6336d2e58d3c94884d2c40bd910bef +guid: a025b7dc17054bb41ae56d364d78d120 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/VRM/Editor/Format/VRMVersionMenu.cs b/Assets/VRM/Editor/Format/VRMVersionMenu.cs index 7fac15276..95aea3333 100644 --- a/Assets/VRM/Editor/Format/VRMVersionMenu.cs +++ b/Assets/VRM/Editor/Format/VRMVersionMenu.cs @@ -40,11 +40,11 @@ namespace UniGLTF /// /// VRM /// - const string VrmVersionPath = "Assets/UniGLTF/Runtime/UniGLTF/UniVrmPackageVersion.cs"; + const string VrmVersionPath = "Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs"; const string VrmVersionTemplate = @" namespace UniGLTF {{ - public static partial class UniVrmPackageVersion + public static partial class PackageVersion {{ public const int MAJOR = {0}; public const int MINOR = {1}; @@ -251,7 +251,7 @@ namespace UniGLTF void OnGUI() { GUILayout.Label("VRM"); - GUILayout.Label($"Current version: {UniVrmPackageVersion.VERSION}"); + GUILayout.Label($"Current version: {PackageVersion.VERSION}"); m_vrmVersion = EditorGUILayout.TextField("Major.Minor.Patch", m_vrmVersion); GUILayout.Space(30); @@ -324,7 +324,7 @@ namespace UniGLTF public static void ShowVersionDialog() { var window = ScriptableObject.CreateInstance(); - window.m_vrmVersion = UniVrmPackageVersion.VERSION; + window.m_vrmVersion = PackageVersion.VERSION; // window.m_uniGltfVersion = UniGLTFVersion.VERSION; window.ShowUtility(); } diff --git a/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs b/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs index 937d3a40c..19c4d1ac0 100644 --- a/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs +++ b/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs @@ -176,7 +176,7 @@ namespace VRM { serializedObject.Update(); - if (UniVrmPackageVersion.IsNewer(m_exporterVersion.stringValue)) + if (PackageVersion.IsNewer(m_exporterVersion.stringValue)) { // モデルのバージョンが、ライブラリのバージョンより新しい EditorGUILayout.HelpBox("Check UniVRM new version.", MessageType.Warning); diff --git a/Assets/VRM/Editor/VRMExportUnityPackage.cs b/Assets/VRM/Editor/VRMExportUnityPackage.cs index 8ff83f751..35be05607 100644 --- a/Assets/VRM/Editor/VRMExportUnityPackage.cs +++ b/Assets/VRM/Editor/VRMExportUnityPackage.cs @@ -73,7 +73,7 @@ namespace VRM.DevOnly.PackageExporter var path = string.Format("{0}/{1}-{2}_{3}.unitypackage", folder, prefix, - UniGLTF.UniVrmPackageVersion.VERSION, + UniGLTF.PackageVersion.VERSION, GetGitHash(Application.dataPath + "/VRM").Substring(0, 4) ).Replace("\\", "/"); diff --git a/Assets/VRM/Editor/VrmTopMenu.cs b/Assets/VRM/Editor/VrmTopMenu.cs index f783c7b97..baaadad12 100644 --- a/Assets/VRM/Editor/VrmTopMenu.cs +++ b/Assets/VRM/Editor/VrmTopMenu.cs @@ -6,13 +6,13 @@ namespace VRM { public static class VrmTopMenu { - private const string UserMenuPrefix = UniVrmPackageVersion.MENU; - private const string DevelopmentMenuPrefix = UniVrmPackageVersion.MENU + "/Development"; + private const string UserMenuPrefix = PackageVersion.MENU; + private const string DevelopmentMenuPrefix = PackageVersion.MENU + "/Development"; - [MenuItem(UserMenuPrefix + "/Version: " + UniVrmPackageVersion.VRM_VERSION, validate = true)] + [MenuItem(UserMenuPrefix + "/Version: " + PackageVersion.VRM_VERSION, validate = true)] private static bool ShowVersionValidation() => false; - [MenuItem(UserMenuPrefix + "/Version: " + UniVrmPackageVersion.VRM_VERSION, priority = 0)] + [MenuItem(UserMenuPrefix + "/Version: " + PackageVersion.VRM_VERSION, priority = 0)] private static void ShowVersion() { } [MenuItem(UserMenuPrefix + "/Export to VRM 0.x", priority = 1)] diff --git a/Assets/VRM/Runtime/Format/glTF_VRM_extensions.cs b/Assets/VRM/Runtime/Format/glTF_VRM_extensions.cs index 12a3dc354..631b3fc9e 100644 --- a/Assets/VRM/Runtime/Format/glTF_VRM_extensions.cs +++ b/Assets/VRM/Runtime/Format/glTF_VRM_extensions.cs @@ -15,8 +15,8 @@ VRM extension is for 3d humanoid avatars (and models) in VR applications. public static readonly Utf8String ExtensionNameUtf8 = Utf8String.From(ExtensionName); - [JsonSchema(Description = @"Version of exporter that vrm created. " + UniVrmPackageVersion.VRM_VERSION)] - public string exporterVersion = "UniVRM-" + UniVrmPackageVersion.VERSION; + [JsonSchema(Description = @"Version of exporter that vrm created. " + PackageVersion.VRM_VERSION)] + public string exporterVersion = "UniVRM-" + PackageVersion.VERSION; [JsonSchema(Description = @"Version of VRM specification. " + VRMSpecVersion.VERSION)] public string specVersion = VRMSpecVersion.Version; diff --git a/Assets/VRM/Runtime/IO/VRMData.cs b/Assets/VRM/Runtime/IO/VRMData.cs index 62adf3d89..763ccde72 100644 --- a/Assets/VRM/Runtime/IO/VRMData.cs +++ b/Assets/VRM/Runtime/IO/VRMData.cs @@ -22,10 +22,10 @@ namespace VRM private static void UpdateMigrationFlags(MigrationFlags migrationFlags, string exportedVrmVersionString) { - if (!UniVrmPackageVersion.ParseVersion(exportedVrmVersionString, out var exportedVrmVersion)) return; + if (!PackageVersion.ParseVersion(exportedVrmVersionString, out var exportedVrmVersion)) return; - migrationFlags.IsBaseColorFactorGamma = UniVrmPackageVersion.IsNewer( - new UniVrmPackageVersion.Version + migrationFlags.IsBaseColorFactorGamma = PackageVersion.IsNewer( + new PackageVersion.Version { Major = 0, Minor = 54, @@ -35,8 +35,8 @@ namespace VRM exportedVrmVersion ); - migrationFlags.IsRoughnessTextureValueSquared = UniVrmPackageVersion.IsNewer( - new UniVrmPackageVersion.Version + migrationFlags.IsRoughnessTextureValueSquared = PackageVersion.IsNewer( + new PackageVersion.Version { Major = 0, Minor = 69, @@ -45,8 +45,8 @@ namespace VRM }, exportedVrmVersion ); - migrationFlags.IsEmissiveFactorGamma = UniVrmPackageVersion.IsNewer( - new UniVrmPackageVersion.Version + migrationFlags.IsEmissiveFactorGamma = PackageVersion.IsNewer( + new PackageVersion.Version { Major = 0, Minor = 107, diff --git a/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs b/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs index 6d776d2f4..519b9d35c 100644 --- a/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs +++ b/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs @@ -253,7 +253,7 @@ namespace VRM.SimpleViewer private void Start() { m_version.text = string.Format("VRMViewer {0}.{1}", - UniVrmPackageVersion.MAJOR, UniVrmPackageVersion.MINOR); + PackageVersion.MAJOR, PackageVersion.MINOR); m_open.onClick.AddListener(OnOpenClicked); m_useFastSpringBone.onValueChanged.AddListener(OnUseFastSpringBoneValueChanged); OnUseFastSpringBoneValueChanged(m_useFastSpringBone.isOn); diff --git a/Assets/VRM/Tests/VersionTests.cs b/Assets/VRM/Tests/VersionTests.cs index 9792e1e80..a55a5331b 100644 --- a/Assets/VRM/Tests/VersionTests.cs +++ b/Assets/VRM/Tests/VersionTests.cs @@ -5,13 +5,13 @@ namespace VRM public class UniVRMVersionTests { [Test] - [TestCase(UniGLTF.UniVrmPackageVersion.VERSION, false)] + [TestCase(UniGLTF.PackageVersion.VERSION, false)] [TestCase("0.199", true)] [TestCase("0.199.0", true)] [TestCase("1.0.0", true)] public void IsNewerTest(string newer, bool isNewer) { - Assert.AreEqual(isNewer, UniGLTF.UniVrmPackageVersion.IsNewer(newer)); + Assert.AreEqual(isNewer, UniGLTF.PackageVersion.IsNewer(newer)); } [Test] @@ -26,7 +26,7 @@ namespace VRM [TestCase("1.0.0", "0.51.0", true)] public void IsNewerTest(string newer, string older, bool isNewer) { - Assert.AreEqual(isNewer, UniGLTF.UniVrmPackageVersion.IsNewer(newer, older)); + Assert.AreEqual(isNewer, UniGLTF.PackageVersion.IsNewer(newer, older)); } [Test] @@ -38,8 +38,8 @@ namespace VRM [TestCase("aaaaa", false, 0, 0, 0, "")] public void ParseVersionTest(string version, bool canBeParsed, int major, int minor, int patch, string pre) { - UniGLTF.UniVrmPackageVersion.Version v; - var res = UniGLTF.UniVrmPackageVersion.ParseVersion(version, out v); + UniGLTF.PackageVersion.Version v; + var res = UniGLTF.PackageVersion.ParseVersion(version, out v); Assert.AreEqual(canBeParsed, res); if (res) { diff --git a/Assets/VRM10/vrmlib/Runtime/Model.cs b/Assets/VRM10/vrmlib/Runtime/Model.cs index 703326903..5cb1195f8 100644 --- a/Assets/VRM10/vrmlib/Runtime/Model.cs +++ b/Assets/VRM10/vrmlib/Runtime/Model.cs @@ -25,7 +25,7 @@ namespace VrmLib public Coordinates Coordinates; public string AssetVersion = "2.0"; - public string AssetGenerator = $"UniVRM-{UniVrmPackageVersion.VERSION}"; + public string AssetGenerator = $"UniVRM-{PackageVersion.VERSION}"; public string AssetCopyright; public string AssetMinVersion; diff --git a/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs b/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs index 6d776d2f4..519b9d35c 100644 --- a/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs +++ b/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs @@ -253,7 +253,7 @@ namespace VRM.SimpleViewer private void Start() { m_version.text = string.Format("VRMViewer {0}.{1}", - UniVrmPackageVersion.MAJOR, UniVrmPackageVersion.MINOR); + PackageVersion.MAJOR, PackageVersion.MINOR); m_open.onClick.AddListener(OnOpenClicked); m_useFastSpringBone.onValueChanged.AddListener(OnUseFastSpringBoneValueChanged); OnUseFastSpringBoneValueChanged(m_useFastSpringBone.isOn);