Search Unity

ONGUI() Button Not working on IOS Build

Discussion in 'Immediate Mode GUI (IMGUI)' started by URGr8, Oct 22, 2021.

  1. URGr8

    URGr8

    Joined:
    Sep 10, 2012
    Posts:
    23
    I have an old unity 5 project that uses OnGUI().
    Inside I have GUI.Button() that is called.
    All of this works fine in the Editor, PC, PC Build, IOS Build (with new XCode 13)
    When I update the project to Unity 2018.4, 2019, 2020 versions then It works in the Editor, but..
    It does not work when I make an IOS build and run it on the device.

    I even tried just making the first call GUI.Button() as a test in OnGUI(), but it does not trigger or hover.
    The graphics in OnGUI() still draw properly and I still get MouseDown input.

    I added a Canvas and Event system with a test Button and that works. Seems IMGU is not working for Input.

    Any help on solving this? I don't know why it would not work in the latest versions of unity.
    I can't upgrade the UI right now, was trying to get this updated version out now.
     
  2. URGr8

    URGr8

    Joined:
    Sep 10, 2012
    Posts:
    23
    --RESOLVED--
    To follow up on this in case anyone else runs into this.
    It seems to work on Unity 2017.4, anything after that the OnGui() - GUI.Buttons don't seem to work on an IOS build.