Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. 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,106
    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