Object moves on PC but not on Android

I created a brick breaker game and it works fine on PC. When I click on screen (or touch screen), a ball appears and start moving forward. But on Android it won’t move at all. Here’s my code:

public class Ball : MonoBehaviour {
	public Vector3 direction = Vector3.up;
	public float speed = 1.0f;
	
	// Use this for initialization
	void Start () {

	}
	
	// Update is called once per frame
	void Update () {
//		transform.position += direction * speed * Time.deltaTime;
		transform.Translate (direction * speed * Time.deltaTime);
// try both ways but no one works (both work on PC)
	}

    <more codes>
}

Can someone tell me why? Thanks and sorry for my bad English.

// Edit:

I created a very very simple project just to test the movement of object on Android device:

  • A sphere object

  • A script attached to sphere:

    public Vector3 direction = Vector3.up;

     // Use this for initialization
     void Start () {
     	
     }
     	
     // Update is called once per frame
     void Update () {
     	transform.Translate (direction * Time.deltaTime);
     }
    

And result is still the same. On PC it works fine (of course) but nothing happens on Android. I’m so confused :frowning:

May be it is due to touch screen and you handle mouse only? Try to check exactly if touches (not only mouse) are detecting.

use input.GetMouseButtonDown
it works for both mouse and touch screen…

It’s my ROM problem, after flash another ROM everything is fine now, thanks for your help