Log in or register to post comments

App cannot exit when press back button

September 26, 2013 - 8:30pm #1

Hi, I had tried the ImageTargets.unitypackage that download from this site and installed it in my Android phone. It run good but when i wan to exit this application by pressing the back button of my phone, it does getting any response. I cannot even exit the application. Why?

 

Please help.

Thanks.

App cannot exit when press back button

November 7, 2013 - 12:25am #6

You can add that code to a script attached to the ARCamera or to another game object (does not really matter, as that code only handles input)

 

App cannot exit when press back button

November 6, 2013 - 11:30pm #5

AlessandroB wrote:

The reason is simply because the sample does not implement a logic to exit the when pressing the back button;

you can achieve that by implementing the back button press handling, for instance this code should do it:

if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); }

 

 

 

Dear AlessandroB
please tellme where should i add the code ?
is that to ARCamera or some where else ?

App cannot exit when press back button

November 5, 2013 - 6:16pm #4

where should i implement the code below???
 

Quote :

The reason is simply because the sample does not implement a logic to exit the when pressing the back button;

you can achieve that by implementing the back button press handling, for instance this code should do it:

if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); }

App cannot exit when press back button

September 27, 2013 - 5:39pm #3

Thanks for helping.

App cannot exit when press back button

September 27, 2013 - 12:32am #2

The reason is simply because the sample does not implement a logic to exit the when pressing the back button;

you can achieve that by implementing the back button press handling, for instance this code should do it:

if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); }

 

 

Log in or register to post comments