Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Android Back Button Event cause Applicantion crash

$
0
0
hi, I'm trying to develop and application for Android Platform, and even with the following code, if I press the virtual back button on my nexus5 the app crash and the screen keep blocked for a while. How can I fix that? using UnityEngine; using System.Collections; public class intercep_key : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { if (Input.GetKey(KeyCode.Escape)) { Application.Quit(); } } }

Viewing all articles
Browse latest Browse all 2383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>