public void DragUpdate(RaycastHit hit, InputInstance parentInstance) { if (hit.collider == null) { return; } if (!parentInstance.JewelsDraggedOver.Contains(hit.collider.gameObject.GetComponent <Jewel>())) { parentInstance.AddDraggedOver(hit.collider.GetComponent <Jewel>()); } }