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. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Why 2019.3.0f6 is soo slow to open scene and starting scenes?

Discussion in 'Editor & General Support' started by MrGky93, Feb 1, 2020.

  1. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    So when i open a scene it need about 30-60sec ?? And when i want to start the scene it need about 40-120sec?(small project )
    My other project its not possible to start the scene waiting about 10min nothing happend??!!
    have someone a solution for this?
     
  2. Elfstone

    Elfstone

    Joined:
    Apr 13, 2015
    Posts:
    24
    Hi. I googled and got here. My editor freezes for minutes when I open a scene. We might not have run into the same problem/bug, because mine only happens after 2019.3.3. But have you perhaps solved yours somehow?
     
  3. japhib

    japhib

    Joined:
    May 26, 2017
    Posts:
    65
    I had a project once where something similar was happening. This depends completely upon what you have in your scene.

    The best way to figure out what's making it so slow is to make a copy of your scene, and then in the copy just go through and start deleting stuff. Delete one thing and then start the scene and see how long it takes to start. As soon as it's fast again, try adding stuff back in one by one, starting the editor between each one, and you'll be able to figure out what was slowing it down.

    There is a possibility that it's just a Unity problem -- you can test that by just having a completely empty scene and starting. It should be super fast.
     
    Elfstone likes this.
  4. Elfstone

    Elfstone

    Joined:
    Apr 13, 2015
    Posts:
    24
    Thanks! I tried and found out deleting (or mere selecting) certain objects in the scene takes minutes. I have absolutely no idea what's wrong with those objects. They are simple static regular sized meshes with no scripts attached. But the scene opens normally with them removed (or readded). Any ideas?

    * Things used to be so much simpler when I was working with engines with full source code available. Now I have to try everything in a buggy editor cluelessly.
     
  5. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,268
    The unity Source code is available just not for free :)

    A good tool to figure out what unity is doing if its slow is the Profiler, you can enable it for the editor too.
     
    Elfstone and MartinTilo like this.
  6. Elfstone

    Elfstone

    Joined:
    Apr 13, 2015
    Posts:
    24
    So the problem may be that GC.MarkDependencies took 110 seconds. I don't think I can do anything about it though.
     
  7. Elfstone

    Elfstone

    Joined:
    Apr 13, 2015
    Posts:
    24
    It turns out Polybrush left megabytes of serialized data attached to these objects somehow in this scene.
    I don't know how it happened, don't know how Unity serialization works, why PolyMesh data remain when no PolyBrushMesh script is present. But when I revert the parent prefab of these meshes, PolyMesh remains are gone, and the scene loads normally. Removing them with a text editor fixes the scene!
    I guess these data may be considered dirty, which may explain why the editor froze on GC.MarkDependencies. Just wondering why previous versions are all fine.
     
  8. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,760
    Turn on the editor profiler. Some plugins can slow down scene opening and asset saving.

    For me any google plugin kills all performance. Disable all automated google tools.
     
  9. Elfstone

    Elfstone

    Joined:
    Apr 13, 2015
    Posts:
    24
    In my case. I've tested my bare scene.unity in an empty project. It was some seemingly unreferenced data Polybrush had mysteriously left causing the problem. All hundreds of thousand lines of m_PolyMesh.vertices, ~.triangles ... with the same amount of data, PolyBrush isn't causing any trouble when an Polybrush Mesh component holding that data is present.
    I'll try to reproduce it and upload, or file a bug, when possible.
     
    MartinTilo likes this.
unityunity