Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Quiting a XR app results in Windows crash Unity 2018.1.0b13

Discussion in '2018.1 Beta' started by TimElschner, Apr 12, 2018.

  1. TimElschner

    TimElschner

    Joined:
    Jan 29, 2014
    Posts:
    8
    I am trying to close and exit an xr app using the following method:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class quit_app : MonoBehaviour {

    // Update is called once per frame
    void Update () {
    if (Input.GetKeyDown(KeyCode.Escape))
    {
    Debug.Log("Closing VR App");
    Application.Unload();
    Application.Quit();
    }
    }
    }

    The app closes but also a windows crash handler of the app is show.
    Any help really appreciated.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    You don't need to call Application.Unload if you just want to close your app.
    https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Application.Unload.html

    But it shouldn't crash in any case. Could you please submit a bug report with a minimal reproduction project and reply in here with the case #?

    You can find best practices for these procedures here: A guide to beta testing