From 11541b5cd31359b9b4312d34efaab65e87544260 Mon Sep 17 00:00:00 2001 From: matsutaka Date: Wed, 24 Jun 2026 17:18:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20VRM10=5FSamples=20-=20Unity=206.5=20?= =?UTF-8?q?=E3=81=A7=E3=81=AE=E3=82=A8=E3=83=A9=E3=83=BC=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - - Handles.SphereHandleCap()等の第一引数 control id をコンポーネントから取得する関数を追加 --- .../ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs index c51a2b7ae..5ab4f8919 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs @@ -154,8 +154,13 @@ 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(GetControlId(t), t.position, t.rotation, p.Settings.Radius * 2, EventType.Repaint); } } +#if UNITY_6000_5_OR_NEWER + static int GetControlId(Component component) => EntityId.ToULong(component.GetEntityId()).GetHashCode(); +#else + static int GetControlId(Component component) => component.GetInstanceID(); +#endif } } \ No newline at end of file