Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Solved] Windows Phone 8.1: GUI Button OnClick not working?

Discussion in 'Windows' started by OneManBandGames, Jul 9, 2015.

  1. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    I'm currently trying to build my game on windows phone 8.1. The game runs fine under Windows Desktop, Android and Web plugin and uses the vanilla Unity GUI with panels, buttons, etc.

    However when I build for windows phone 8.1 my GUI buttons aren't working anymore. Regular touches on the screen that control the player character are still working as intended.

    I made a small simple example game (see attachment) that only has one button that changes a text control on the screen, this does not work for me on windows phone 8.1 as well but runs fine in the Unity editor.

    On windows phone 8 everything seems to work as intended. I'm Using Unity Unity 5.1.1f1 (64-bit) and I'm testing the game in the emulator so far, physical device is on its way. =)

    Can anybody please confirm that this doesn't work on windows phone 8.1? Or am I missing something here?
     

    Attached Files:

  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    Try to disable or remove desktop input module. If you are targetting only phones, it should be disabled.
    I haven't tried emulator, but on regular Windows Store Apps both desktop and touch input modules can get activated, and desktop module doesn't handle atouches well (that's a known issue).
     
  3. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Thanks for the quick reply! I tried to disable and remove the standard input module, but no luck so far. If this is a known issue with the input modules, I should be able to find something on the net, so far I only tried searching around the button / gui / Onclick event. If I'm able to find something, I will post it here as well.

    If anybody else has already successfully used the vanilla GUI with a button in the emulator whilst targeting windows phone 8.1 please let me know with a short reply. =)
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,644
    I think I remember such an issue from a long time ago. The issue existed on the emulator only, so it took us a long time to notice (we don't really test internally on emulators). I'll ask our QA to try to reproduce it on both physical device and emulator, and I'll let you know of the results.
     
  5. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Wow, thanks a lot this would be really helpful since I have made no progress here so far! If it is just an emulation issue I could continue developing on a physical device once I have it.
     
  6. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Argh, I just realised I forgot to tell you one important thing: I currently develop in a virtual environment (Vmware) since my main PC has still windows 7 installed and I was reluctant to install a new OS with the official release of Windows 10 around the corner. Maybe this is cause of the issue, however the touch inputs worked flawlessly in the emulator when targeting windows phone 8.
     
  7. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    Stop the presses: The physical device has arrived, and the GUI works as expected on a real windows phone. I therefore assume this is a problem with virtualization / emulation, not with the unity player itself.
     
  8. NinjaCat

    NinjaCat

    R&D Minion

    Joined:
    Aug 22, 2013
    Posts:
    69
  9. gn.gametorque

    gn.gametorque

    Joined:
    Feb 13, 2015
    Posts:
    26
    Any solution to this problem?
    I am experiencing this
    with Unity 5.3.3
    and Visual Studio 2015
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,644
    Test on a real device.
     
    gn.gametorque likes this.
  11. Pollyfun

    Pollyfun

    Joined:
    Nov 6, 2009
    Posts:
    13
    We get the bug too. Using the emulator is faster than building to the device, so it would be good to have it fixed.
     
    andycodes and gn.gametorque like this.
  12. Green-Sauce-Games

    Green-Sauce-Games

    Joined:
    Mar 27, 2014
    Posts:
    71
    I have this bug on Unity 5.4.

    I only have Win10 devices for testing. I need the emulator for Testing on Windows 8.1 devices.
     
  13. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    It's not a Unity bug, the bug is in emulator itself, so it's very doubtful it will be ever fixed.