I believe I can check to see if I am on a mobile device by using:
if (SystemInfo.deviceType == DeviceType.Handheld)
{
}
But if that is the case, I want to disable:
private void OnMouseDown()
{
}
and use something appropriate for mobile such as:
private void Update()
{
if (Input.GetTouch() > 0)
{
}
}
I need to do this because OnMouseDown() will still be called on mobile, but it is recommended to not be used.
How can I call OnMouseDown()
if I am on a desktop, and call Input.GetTouch() > 0
if I am on a mobile?