Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

When I reload a scene, GUI on second display stops working

Discussion in 'Editor & General Support' started by Otyugra, Jun 5, 2020.

  1. Otyugra

    Otyugra

    Joined:
    Dec 27, 2018
    Posts:
    3
    • I am using Unity version 5.6.6f.
    • This is a problem that occurs regardless of what platform the game is being built to.
    • All GUI objects for the second display are in the same scene as the objects on the first display, including the first display's GUI.
    • The GUI of the first display works correctly after the scene transition, however, it has no interactable buttons whereas the second display does, and it's those buttons that are giving me trouble.
    • The problem is happening when I test it from within Unity Editor. I haven't yet tested it in an actual game build.
    • I have been able to debug the problem enough to discover that when the button is clicked on with the mouse, the method meant to react to being pressed does not think it had been activated (nor do the buttons visually react to being clicked).
    • The buttons are active in the scene, as opposed to being a frozen image left there by the GPU.
    • The second display is a necessary part of my game due to the platform it is being built to.
    EDIT: Here's the line of code that loads the scene: SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().buildIndex);
     
  2. Otyugra

    Otyugra

    Joined:
    Dec 27, 2018
    Posts:
    3
    Interesting development: I built the game and discovered that it DOES work correctly in the actual game itself but only malfunction when being tested within Unity Editor 5.6.6f. Given that Unity 5 is so outdated, my guess is that I'm going to have to go thru private, confidential channels to ask Unity to fix the bug. Believe it or not, they WILL fix the problem for me because the platform I export to uses an alternative version of Unity 5 as the most up-to-date version.

    I can't tell you how relieved I am that it at least doesn't affect the version of the game my player's and playtesters will see. I had very little faith anyone was going to be able to help me debug this problem. I was actually a little scared about how I was going to proceed.