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. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

UI Destroy or SetActive(false) of Worldspace Canvas with UI Children Crashes Editor

Discussion in '5.4 Beta' started by Jmangles, Jul 24, 2016.

  1. Jmangles

    Jmangles

    Joined:
    Aug 1, 2015
    Posts:
    50
    Hey I'm trying to see if this bug is reproducible for systems other than my own, currently I can crash a brand new empty project in 5.4.0f2 by putting a Canvas down, setting it to Worldspace, giving it an Image as a child, and then either using Destroy or SetActive(false) on the Canvas during play mode in the Editor.

    The Destroy/SetActive have to be called after Awake/Start or else they'll work as intended. Setting it up so it gets destroyed or deactivated on a keypress is a good way to test.

    It does not crash standalone builds and it was not an issue in 5.3.5.
     
    makeshiftwings likes this.
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,324
    I recommend to submit a bug-report with a minimal project to reproduce the issue. I believe most useful would be a project that is already set-up, so Unity QA only needs to press "Play" to crash the editor.
     
  3. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Yes please file a bug i believe i've tested with many projects that do exactly that and they work
     
  4. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,346
    Aaaaaaargh I wish I had seen this yesterday it would have saved me the 8 hours of figuring out how to repro it myself. :p
     
  5. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Hey, we are investigating this issue key a eye on your bug for a resolution.