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. Dismiss Notice

Touch/Mouse no longer working after build

Discussion in 'Editor & General Support' started by squigglyo, Sep 3, 2014.

  1. squigglyo

    squigglyo

    Joined:
    May 21, 2012
    Posts:
    107
    For some reason, everytime I build my project, my touch and mouse input no longer works and I have to restart Unity to get it back.
    This carries over to the build however, rendering the build unusable.

    The code is not the issue, neither is the project.

    https://drive.google.com/file/d/0B5VUJafJTcfJejdQWGZHS2dtbWs/edit?usp=sharing

    That is a link to a very basic, near empty project that is pretty much just mouse/input test. It works fine until I make a build, then all input fails. The build doesnt even have to succeed, doing an android build that fails due to the keystore or something still destroys all the mouse/touch.
     
  2. squigglyo

    squigglyo

    Joined:
    May 21, 2012
    Posts:
    107
    web build seems to be fine, so perhaps its only when building to devices.

    Tested with Windows Phone and Android, both fail. But web build works.
     
  3. squigglyo

    squigglyo

    Joined:
    May 21, 2012
    Posts:
    107
    can someone please test my project? I need to know if its my unity or not so I can figure out how to fix this. Really holding up the release of my game :(
     
  4. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    I'll give it a test, I have a Windows Phone here.

    I need to know what version of Unity you are using, and which WP8 device where you trying it on?
     
  5. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    Not tried it on a phone yet but if you take out the IF definition it works fine as a standalone build.

    Code (CSharp):
    1. //#if UNITY_EDITOR
    2.         void OnMouseUp()
    3.         {
    4.             OnTouchUp();
    5.         }
    6.         void OnMouseDown()
    7.         {
    8.             OnTouchDown();
    9.         }
    10.     //#endif
     
  6. squigglyo

    squigglyo

    Joined:
    May 21, 2012
    Posts:
    107
    hmm, doing that fixed the problem, but I dont know why...