Hi,
I'm using OnSelect() to detect if there is a mouse click outside a popup then to close it.
void OnSelect(bool isSelected)
{
if (!isSelected && (UICamera.hoveredObject == null || UICamera.hoveredObject.tag != "FilterPopup"))
{
HideView();
}
}
This works great however, in the popup there is a scrollbar, and when we click on the scrollbar, and click somewhere else on the ui, it looks like UICamera.hoveredObject is still on the scrollbar.
Any help will be much appreciated. I've also tried using selectedObject but its still getting the scrollbarobject when clicking something else on the ui