mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-25 03:55:52 -05:00
fix: VRM10_Samples - Unity 6.5 でのエラーを修正
- - Handles.SphereHandleCap()等の第一引数 control id をコンポーネントから取得する関数を追加
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user