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

Bug Editor loses lightmap when stopping play in a different scene than what you started

Discussion in 'Global Illumination' started by AcidArrow, Nov 6, 2022.

  1. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,630
    This issue started happening in 2021LTS builds of the last couple of months. I'm recreating this on a Mac, but I've also seen it happen on Windows. Not sure if it affects other Unity versions.

    It's not a huge issue, it's just a bit annoying and frustrating.

    The issue is:

    You start in a lightmapped scene.

    You press play.

    While playing another scene is loaded (as part of the game).

    If you then press STOP, you go back to scene you started from (which make sense), but the lightmaps are gone.

    You need to reload the scene to get lightmaps back.

    As I said, no biggie, but it's getting a bit annoying, especially since I'm working on polishing transitions between scenes.

    See the video (after the fade out part a different scene is loaded):

     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Good to see you again @AcidArrow.

    I've not seen this issue myself, so I think it warrants reporting. Bug triage process got more complicated after we switched over to JIRA. In the report, please include "assign to Light Transport team" so that it gets forwarded to us more quickly. Will not bore you with other details, since you had reported numerous issues in the past.
     
    AcidArrow likes this.
  3. JacobK

    JacobK

    Joined:
    Jun 18, 2013
    Posts:
    20
    Having this too - think I started getting it in around 2021.3.11?
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,630
    Yup, that's where QA found it started happening as well.
    upload_2022-11-12_15-44-21.png
    Thanks, although I think coming back was a mistake (for reasons not related to this thread), so I think I will leave again.

    I would like for this issue to get fixed though and I'm not quite sure if it's progressing normally through QA.

    I submitted it on Monday (Nov 7th). Soon after (I think the next day) the description was re-written / simplified and a list of reproducible and not reproducible Unity versions was added (see image above), which I think pretty clearly indicates QA was able to reproduce the issue.

    But the issue status is still "IN REVIEW". I would expect it to be "CONFIRMED" at this point, but maybe I don't understand how the new Jira based QA process works?

    In any case, it's issue IN-22296
     
  5. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    This new JIRA process is somewhat opaque to us as well. Unlike before, we have no access to incoming cases - only customer QA does. But at least in your case, it's somewhat reassuring that CQA have managed to repro the issue locally.

    Also, you are more than welcome to stay. If you have any feedback about our lightmapping tools, please feel free to share them either in a separate thread, or in a DM. I will make sure that our team will hear about it.
     
  6. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    IT still happends on Unity 2021.3.22 on Windows. When it will be fixed? Overall Unity 2021 seems to have like a lot of editor problems comparing to older 2019.4
     
  7. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    307
    This should be fixed on 2023.2. It's currently being backported to previous LTS versions. I can't give an ETA for 2021.3
     
  8. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Please I hope its a joke :) I was like on Unity 2019.4 we upgraded to 2021 LTS as 3 years later version, and now I get information that there are even bigger bugs making the engine unusable. 2021.3 is now the newest LTS it should be a priority to fix problems on the newest LTS. Or Am I understanding something wrong? This is like a huge bug, it corrupts the whole scene just going out of play mode. So basically if You won't notice the change and save the scene You have a corrupted scene.
    Don't get me wrong but I feel like LTS doesn't have any sense as big breaking editor/ scenes problems are not fixed there. We are upgrading like from LTS to LTS and every of that version has like game-breaking or editor-breaking bugs about the lightmaps. I understand small problems, but it is like a huge one, making the editor unusable for everyone who uses Lightmaps. (And it is like 2021.3.22, not 2021.0 so there should be no such big problems at all in such an old LTS.)

    I understand You are making like a huge job of supporting all that versions but maybe there should be one LTS version supported well than 3 supported badly. Huge problems like destroying the whole lightmaps, losing references or crashes, should be like top priority of fix.

    One more remark from me is that bugs like these should be added to issue tracker, Most of bugs aren't in issue tracker, so users can't find it easily so they are reporting it again and again.

    Please clarify if I understand that correctly. You are saying that won't be fixed in 2021 even if that is the most current LTS. Or It will be fixed for 100% but it is unknown when?
     
    Last edited: Apr 6, 2023
  9. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    P.S I found another bug on 2021.3. When You assign the same lightning setting asset and then click play and go to load and unload the scenes, some of scenes have that lightning settings asset is missing in some scenes what makes scenes object black in shadows. The lighting is really messed up on 2021 LTS in serious way.
     
  10. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    307
    Hey there, to answer some of your questions:
    - The bug posted by OP shouldn't destroy any data on disk, and has a very simple workaround; you just reload the scene. It's essentially a visual issue that only affects the editor. If you are seeing a different yet similar bug, I suggest filing a new bug report.
    - This bug has a public issue tracker. It's here https://issuetracker.unity3d.com/is...ay-mode-switching-scene-and-exiting-play-mode
    - The bug should be fixed for 2021 LTS. The issue tracker shows "Under Consideration" status, but these kind of backports are rarely rejected. We deal with a very large amount of backports, and the order in which bugs are fixed in bleeding edge versions of Unity does not match the order in which backports are completed. This is why I can't give you an ETA.
     
  11. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    307
    Are you talking about Lighting Settings Assets, or Lighting Data Assets here? Either way, this sounds like a separate bug. If you want to see fixed, I'd suggest filing a bug report with clear reproduction steps.
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,630
    This is correct. I thought maybe I'm too cautious and had avoided saving when the lightmaps weren't showing, but I just now explicitly tried to cause the bug, stop play, make a random change to the scene, then save. Upon reloading the scene everything was fine.

    If there is corruption, it's a different bug.
     
  13. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Thanks for letting me know. There are 2 bugs, sometimes lightmap setting asset disappears after exiting play mode (is missing) sometimes game object on scene lost it lightmap reference. What about second bug So if scene objects lost its lightmap reference and I click save it wont save that empty reference? Am I right? Its not so simple in my opinion you could for example work on the scene make some changes then click playmode and forget that you later cant save the scene. This is like a serious destroying scene bug.

    I understand the point with a lot of work with backporting LTS. but should it be opposite? LTS should be like first priority as 90% of serious project is probably on LTS as big game projects always will choose stability over new features and for now it seems like non LTS versions are priority over LTS. As I mentioned I understand minor bugs, but destroying scenes is like a huge problem
     
  14. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    307
    Lightmap references aren't actually stored in the scene at all (until you have a built player), they are stored in a Lighting Data Asset. When you load a scene in the editor, it fetches the corresponding Lighting Data Asset and modifies each renderer in the scene to use the correct lightmap based on the fetched data. For that reason, saving a scene while it is in a state where objects are missing their lightmaps isn't usually as destructive as you might think. When "objects lose their lightmap reference" it's often a temporary thing that can be fixed by reloading the scene. With the bug posted by OP, this is the case.

    As for the bug with disappearing lightmap settings assets, I've never heard of this, and would suggest filing a bug report for it.

    I'm afraid I can't meaningfully comment on the company's strategy with regards to LTS releases.
     
  15. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Thanks for clarification. Seems like then waiting for fix or downgrading unity to 2019 is only one solution to work smooth way on project. Yes I understand this is not a place to write a feedback about LTS, but to be honest I can't see any other way to leave feedback about engine and LTS other than forum :)

    Thanks for Your help! Waiting for the fix.
     
  16. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    I noticed bug is in review for 2021.3. Thanks for that! I hope in review means that faster or longer but it will be fixed for that LTS? :)
     
    melihk likes this.