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

builting to 64 bit android

Discussion in 'Community Learning & Teaching' started by shayCohen007, Mar 24, 2020.

  1. shayCohen007

    shayCohen007

    Joined:
    Oct 7, 2018
    Posts:
    5
    Hi, I created an Android app. When I build it to 32 bit it works fine but when I build it to 64 bit the touch does not work. I tried to change all kinds of functions but once I install the app on my phone the touch does not work.
    (UI button working properly)
    Please help me, I've built a lot of apps and it never happened to me
     
  2. UnityMaru

    UnityMaru

    Community Engagement Manager Unity Technologies

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Could you provide an example set of code showing these touch commands so we could help diagnose the issue?
     
  3. shayCohen007

    shayCohen007

    Joined:
    Oct 7, 2018
    Posts:
    5
    sure, i have to say that I tried all the possible functions...
    What is particularly strange is when i try it on unity remote- it works, but when i install the APK the touch not working (i have ui buttons and they work) and as i said when i built it as 32 bit everything works great but when i built it as 64 bit the problem start...
    i created many games app and it never happend to me...

    anyway' here is part of the code


    void Update()
    {

    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    RaycastHit hit;

    if (Input.touchCount > 0)
    {
    Touch touch = Input.GetTouch(0);
    if (touch.phase == TouchPhase.Began)
    if (Physics.Raycast(ray, out hit, Mathf.Infinity))
    {
    Debug.Log(hit.transform.gameObject.name);

    if (hit.transform.gameObject.name == this.name)
    {


    if (OnBlockPressed != null)
    {

    OnBlockPressed(this);

    }


    }

    }
    }
    }
     

    Attached Files: