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

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:
    53
    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,609
    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

    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,350
    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

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