- Home /
Why my android app closes itself ??
Hi, i have made an android game. If you press escape (so the return key on the mobile) the "pause" text should be appear on the screen.. If i do this on the pc (in unity) it all works correctivly, but on my mobile, the application closes if i press return.. why this happens?
Thank you so much.
The code which manage the escape event is that :
if(!script.end && Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.Escape))
{
if(!paused){
Time.timeScale = 0;
paused = true;
pausetext.SetActive(true);
}
else{
Time.timeScale = 1;
paused = false;
pausetext.SetActive(false);
}
}
else if(script.end && Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.Escape))
Application.LoadLevel("Start");
so in the both cases the application should not quit completely...
Your answer
Follow this Question
Related Questions
Android app closes with "Texture swap animator" script in it 1 Answer
How can I detect if the back button is virtual or physical? Hardware or Software Device buttons 2 Answers
Problem with closing an android app 0 Answers
app just closes right after i open it? 1 Answer
Android back button not registering 1 Answer