fix: VRM10_Samples - Unity 6.5 でのエラーを修正

- - Handles.SphereHandleCap()等の第一引数 control id をコンポーネントから取得する関数を追加
This commit is contained in:
matsutaka
2026-06-24 17:18:50 +09:00
parent 7496de547e
commit 11541b5cd3

View File

@@ -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
}
}