diff --git a/Packages/UniGLTF/Editor/UniGLTF/IO/Texture/Importer/TextureImporterConfigurator.cs b/Packages/UniGLTF/Editor/UniGLTF/IO/Texture/Importer/TextureImporterConfigurator.cs index ccf176dab..d5a6bb45e 100644 --- a/Packages/UniGLTF/Editor/UniGLTF/IO/Texture/Importer/TextureImporterConfigurator.cs +++ b/Packages/UniGLTF/Editor/UniGLTF/IO/Texture/Importer/TextureImporterConfigurator.cs @@ -81,7 +81,21 @@ namespace UniGLTF if (!EditorTextureUtility.TryGetAsEditorTexture2DAsset(externalTexture, out var texture2D, out var importer)) return; Configure(texDesc, importer); - importer.SaveAndReimport(); + + // https://github.com/vrm-c/UniVRM/issues/2813 (4) + // https://github.com/vrm-c/UniVRM/issues/2783 + // + // UnityException: Calls to "AssetDatabase.ImportAsset" are restricted during asset importing. + // Please make sure this function is not called from ScriptedImporters or PostProcessors, + // as it is a source of non-determinism. + var assetPath = importer.assetPath; + EditorApplication.delayCall += () => + { + if (AssetImporter.GetAtPath(assetPath) is TextureImporter i) + { + i.SaveAndReimport(); + } + }; } } } diff --git a/Packages/UniGLTF/Runtime/UniGLTF/PackageVersion.cs b/Packages/UniGLTF/Runtime/UniGLTF/PackageVersion.cs index a3c5813ed..fed56bd8a 100644 --- a/Packages/UniGLTF/Runtime/UniGLTF/PackageVersion.cs +++ b/Packages/UniGLTF/Runtime/UniGLTF/PackageVersion.cs @@ -5,7 +5,7 @@ namespace UniGLTF { public const int MAJOR = 0; public const int MINOR = 131; - public const int PATCH = 1; - public const string VERSION = "0.131.1"; + public const int PATCH = 2; + public const string VERSION = "0.131.2"; } } diff --git a/Packages/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs b/Packages/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs index 6f0a7ff0c..7f149d1c3 100644 --- a/Packages/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs +++ b/Packages/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs @@ -5,7 +5,7 @@ namespace UniGLTF { public const int MAJOR = 2; public const int MINOR = 67; - public const int PATCH = 1; - public const string VERSION = "2.67.1"; + public const int PATCH = 2; + public const string VERSION = "2.67.2"; } } diff --git a/Packages/UniGLTF/package.json b/Packages/UniGLTF/package.json index 3689c218a..a510ce01f 100644 --- a/Packages/UniGLTF/package.json +++ b/Packages/UniGLTF/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.gltf", - "version": "0.131.1", + "version": "0.131.2", "displayName": "UniGLTF", "description": "GLTF importer and exporter", "unity": "2021.3", diff --git a/Packages/VRM/package.json b/Packages/VRM/package.json index 81a14cb9c..a660f33de 100644 --- a/Packages/VRM/package.json +++ b/Packages/VRM/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.univrm", - "version": "0.131.1", + "version": "0.131.2", "displayName": "VRM", "description": "VRM importer", "unity": "2021.3", @@ -14,7 +14,7 @@ "name": "VRM Consortium" }, "dependencies": { - "com.vrmc.gltf": "0.131.1", + "com.vrmc.gltf": "0.131.2", "com.unity.ugui": "1.0.0" }, "samples": [ diff --git a/Packages/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs b/Packages/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs index c51a2b7ae..1df39e720 100644 --- a/Packages/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs +++ b/Packages/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs @@ -154,8 +154,18 @@ namespace UniVRM10.ClothWarp.Components p = m_target.GetParticleFromTransform(p.Transform); var t = p.Transform; Handles.color = Color.green; - Handles.SphereHandleCap(t.GetInstanceID(), t.position, t.rotation, p.Settings.Radius * 2, EventType.Repaint); + Handles.SphereHandleCap(t.GetControlId(), t.position, t.rotation, p.Settings.Radius * 2, EventType.Repaint); } } } + + static class ClothWarpRootEditorExtensions + { + internal static int GetControlId(this Component component) +#if UNITY_6000_5_OR_NEWER + => component.GetEntityId().GetHashCode(); +#else + => component.GetInstanceID(); +#endif + } } \ No newline at end of file diff --git a/Packages/VRM10/package.json b/Packages/VRM10/package.json index 544b77a7a..b262cfb24 100644 --- a/Packages/VRM10/package.json +++ b/Packages/VRM10/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.vrm", - "version": "0.131.1", + "version": "0.131.2", "displayName": "VRM-1.0", "description": "VRM-1.0 importer", "unity": "2021.3", @@ -15,7 +15,7 @@ }, "dependencies": { "com.unity.timeline": "1.7.6", - "com.vrmc.gltf": "0.131.1" + "com.vrmc.gltf": "0.131.2" }, "samples": [ { diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 545d38a9e..06e368fd5 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -163,7 +163,7 @@ "depth": 0, "source": "embedded", "dependencies": { - "com.vrmc.gltf": "0.131.1", + "com.vrmc.gltf": "0.131.2", "com.unity.ugui": "1.0.0" } }, @@ -173,7 +173,7 @@ "source": "embedded", "dependencies": { "com.unity.timeline": "1.7.6", - "com.vrmc.gltf": "0.131.1" + "com.vrmc.gltf": "0.131.2" } }, "com.unity.modules.ai": {