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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

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:
    957
    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:
    957
    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:
    37
    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.