I make my editor on game object. I’d like to have possibility to select few points, lines etc. at same time, by holding shif/crtl. But when I hold shift and press mouse button my game object are deselected. How can I block shift press event at this situation.
void MouseCheck()
{
var currentEvent = Event.current;
if (currentEvent.type == EventType.MouseDown && currentEvent.button == 0)
{
var ray = HandleUtility.GUIPointToWorldRay(currentEvent.mousePosition);
var shift = currentEvent.shift;
var foundObject = owenr.FindClosestPoint(ray.origin, shift, currentEvent.control);
if (!foundObject)
foundObject = owenr.FindClosestLine(ray.origin, shift, currentEvent.control);
if (foundObject)
{
if (shift)
DisableShift();
}
}
}
void DisableShift()
{
??????????????????????
}