Search Unity

UI buttons not working on IOS build

Discussion in 'UGUI & TextMesh Pro' started by clearrose, Feb 29, 2016.

  1. clearrose

    clearrose

    Joined:
    Oct 24, 2012
    Posts:
    349
    Lately when we build and test our game on our test device a iPad, the some of the buttons in our project do not work. I'm using Transition --> color tint and I can see the color change when I press the button, But nothing else the button is suppose to do works. The buttons did work before, I haven't changed any code or anything.

    Any one else having this problem on IOS? suggestions to solve this problem would be appreciated.

    Note: we are using Unity version 5.3.1f1.

    Button Settings and buttons in hierarchy:

    Screen Shot 2016-02-29 at 4.52.23 PM.png Screen Shot 2016-02-29 at 4.52.13 PM.png
     
    ooxcit likes this.
  2. clearrose

    clearrose

    Joined:
    Oct 24, 2012
    Posts:
    349
    Still looking for a solution to this problem.
     
  3. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @clearrose:

    Hi, you have quite many items/buttons in your setup, if every button / control works fine in editor, maybe one or more components anchoring is not OK, and when screen size changes, some element moves, and is covering other buttons, preventing clicks from being detected.

    Do you have canvasGroup components in use, or any other fully transparent elements in your setup? Those are easy to forget IMO.

    I'm using 5.3.3p1 and haven't noticed any problems with buttons so far on iOS.
     
  4. clearrose

    clearrose

    Joined:
    Oct 24, 2012
    Posts:
    349
    But, if the buttons were being covered up by another element why would the color tint still be working when the buttons are pressed?
     
  5. clearrose

    clearrose

    Joined:
    Oct 24, 2012
    Posts:
    349
    Bump.....
     
  6. mogwhy

    mogwhy

    Joined:
    Nov 20, 2014
    Posts:
    36
    play with your raycast settings. maybe that will help
     
  7. clearrose

    clearrose

    Joined:
    Oct 24, 2012
    Posts:
    349
    Thanks, I will try this Mogwhy.
     
  8. clearrose

    clearrose

    Joined:
    Oct 24, 2012
    Posts:
    349
    Thanks for all the help thus far but no solutions proposed as of yet have worked. To check if something might have been blocking the buttons i moved the buttons in the hierarchy so they lay on top one most of the objects in the canvas (except for one item, i didn't think it would be a problem because they are not on the screen at the same time and the new element was designed around the buttons).

    I'm starting to wonder if this might be a unity bug???

    hierarchy (the Highlighted objects are the buttons that aren't working):

    Screen Shot 2016-03-04 at 3.47.57 PM.png
     
    ooxcit likes this.
  9. clearrose

    clearrose

    Joined:
    Oct 24, 2012
    Posts:
    349
    Ok, finally I found the problem. For some reason any buttons using animators or enabling animators were not working on the build to the iPad. I made a test button with no animation that just called the function I needed directly.

    Non-working button's settings:

    Screen Shot 2016-03-04 at 4.28.19 PM.png

    Working buttons settings:

    Screen Shot 2016-03-04 at 4.32.44 PM.png

    I just wish I knew why this was happening ?? well at least i have working buttons now.
     
  10. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Hello,

    I'm having a similar issue and I don't know what you mean by animators. The only difference i notice in your images is that you are not using the image component. I know its a long time you post in this thread, but if you get this and can clarify what you mean if would be a great help.

    Thanks,
    jrDev
     
    ooxcit likes this.
  11. clebertavares

    clebertavares

    Joined:
    Jan 2, 2012
    Posts:
    55
    I´m having a similar issue, but removing the image (or disabling the raycast in them) didnt help...
     
    ooxcit likes this.