Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Is OnMouseDown A Valid Choice For Checking Touches

Discussion in 'Android' started by Tyyy1997, Mar 23, 2014.

  1. Tyyy1997

    Tyyy1997

    Joined:
    Jul 27, 2013
    Posts:
    3
    Well I usually make stuff work on PC first before I make the cross to mobile so it's easier to test, but just for fun I booted my game up on my Android device and was certain it wouldn't work and I was okay with that, until I clicked and realized that it in-fact, was working.. Are these results typical across all devices? I ask this because of the warning it gave me:

    $2cc6a8411f3ea7c753e6ec9140bb502a.png

    Should I listen to this and find another way to check for touch? Or am I safe using OnMouseDown for my game and it run fine across at least 90% of Android devices?
     
  2. Ardmark

    Ardmark

    Joined:
    Oct 24, 2012
    Posts:
    11
    I too would like to know if it's OK to use OnMouseDown. The docs say 'OnMouseEnter, OnMouseOver, OnMouseExit, OnMouseDown, OnMouseUp, and OnMouseDrag events are not supported on Android' - but they work fine on my Kindle Fire and Galaxy S3. I'm wondering if the docs are out of date here, or do we need to use the Input class methods as recommended in other threads?