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