Search Unity

Unapplied prefab change = super long load time.

Discussion in 'World Building' started by Gua, Feb 1, 2019.

  1. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Since this is not a super official bug report, I guess I'm mainly writing it for my future self. So that when I encounter this issue again. I could find this thread and remind myself how to fix it.

    So recently I've noticed that main scene in my game took a huge time to load, enter playmode and exit play mode.

    Here's so rough stats.

    Enter Playmode 1:45 (should be around 00:30)
    Exit playmode 1:30 (should be around 00:08)
    Open scene in editor 1:30 (should be around 00:20)

    I took me several hours to find the source of the issue and it turned out that the issue was caused by a probuilderized model of the house where I didn't apply changes to the house prefab. I soon as I applied those changes issue was gone.

    Currently I'm using ProBuilder 3.0.9 But recently I did try to update to 4.0.3 and If I remember correctly even in 4.0.3 load times were huge.

    I did try to reproduce the issue, but I wasn't able to.
     
    Last edited: Feb 1, 2019
    JaRo-IT and ZhavShaw like this.
  2. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi! Thanks, I'll try to repro this myself. Will update with info!
     
  3. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi! Ok, I can't repro here in 403, could you create an official bug report (Help > Report a Bug) with the scene and object that are being probuilderized and causing long load times? If you can get a repro, that is. Thanks very much!
     
  4. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    I'm using Unity 2018.4.5 and ProBuilder 4.1.0 and the issue has returned. When I remove all probuilder objects from the scene it goes away.

    Here's what editor profiler shows
    https://i.gyazo.com/a4ae012bfa2e086031a7ef8ff5864a3e.png

    I'm currently in a process of finding what specific gameobject causes this issue. But it will take a while.
     
  5. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Unfortunately it seems that this time it isn't related to one specific game object. :( The more probuilder object I removed, the faster enter/exit playmode time became. I'll try new version of probuilder and see how if it helps.
     
  6. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Remove all probuilder scripts in a scene solves this issue. But I'm not sure that this is an ideal solution.
     
  7. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    I've reverted old version of this scene from svn and it doesn't have ridiculous load/enter/exit play mode times. I've tried to make same changes that I did before to trigger this issue, but this attempt wasn't successful. So I wasn't able to get to the bottom of this. My current plant is to use older version of this level and remove probuilder scripts from every object I can't become, even without those ridiculous loading times and difference is still big between scene where probuilder prefabs are present and scene where there are non. (17 sec vs 2-3 sec) to exit play mode for example.

    update: Damn. looks like for prefabs I do need probuilder script. Good thing, there's export to asset option.
     
    Last edited: Dec 9, 2019
  8. JaRo-IT

    JaRo-IT

    Joined:
    Aug 1, 2019
    Posts:
    1
    Oh man, you just saved me. I have created a small part of a prototype city with 39 buildings using same prefab.

    The Play enter time before I read this topic was ~ 20 sec. Now it is 2 sec.

    I have selected all prefabs in hierarchy and just clicked on Overrides -> Apply All.

    Issue fixed.

    Thank you so much for posting this!
     
    Last edited: Feb 28, 2021
    Gua likes this.
  9. CleverAI

    CleverAI

    Joined:
    Jun 4, 2017
    Posts:
    38
    I had to make this experience by myself and there was no clue whatsoever, which causes this long loading times. Until I found out that leaving ProBuilder Scripts on Prefabs was the cause. After I exported the ProBuilder created models as .obj and used them instead, the loading times were fixed.
     
  10. quangavaro

    quangavaro

    Joined:
    Feb 1, 2024
    Posts:
    1
    FIXED!! Thank you so much for this.
     
  11. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,749
    Glad you guys worked it out, but i just have to make a comment: 2018.4.5... really?, lol. 2019 LTS is one of the best versions of Unity, and 2021 LTS is good, but wouldnt use any version higher just yet, but 2018?...
     
  12. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,859
    Maybe look at the dates on some of these posts.
     
    warthos3399 likes this.
  13. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,749
    Gets me every time, lol *facepalm*
     
    spiney199 likes this.