- Home /
Unity 5.2.1 Build crash on Application.Quit(); with Windows Touch
Hi,
I am upgrading my Unity 4 project to Unity 5.2.1. I have used Application.Quit(); to close the app on a button click. This worked fine earlier(Unity 4) and now (Unity 5.2) also works fine with mouse click. But if I click the button using Touch (on Windows 8 or Windows 7 Touch screens) the app crashes.
Then I tested by creating a new Unity project and added the attached file (rename the .txt to .cs) link text to the main camera. When I click this button with Touch it crashes. But doesn't crash with the mouse click. Is this a bug in Unity 5.2.1? How can I fix this issue?
Thanks
if (GUI.Button(new Rect(10, 10, 50, 50), btnTexture))
{
Debug.LogError("Clicked the button with an image");
Application.Quit();
}
Your answer
Follow this Question
Related Questions
Updating Unity caused significant performance loss in Physics 1 Answer
UI Slider when not interactable changes color 1 Answer
UNET 5.2: How do you use NetworkServer.SpawnWithClientAuthority()? 1 Answer
Unity with Logitech G29 controler 1 Answer
Loading Audio from Asset Bundles not working in Unity 5.2 2 Answers