Search Unity

Unity gets stuck in OnGUI.repaint when starting

Discussion in 'Editor & General Support' started by Pohlerbaer, Mar 11, 2022.

  1. Pohlerbaer

    Pohlerbaer

    Joined:
    Mar 8, 2022
    Posts:
    7
    Hey,

    I just started working at a new company, and the project I'm currently working on loads art assets from our local server when opened. The problem I have, is that I have to be offline when opening the project, because the Ethernet port has to be connected to a sensor device I work with.
    When I'm "offline", and loading the project, I get stuck in a endless OnGUI.repaint loop and the Editor crashes. Is there a way to just tell unity to not load assets when I'm not connected to the internet? Right now I have to manually unplug and change the ip adress of the ethernet port, everytime I need to start the project.

    Thanks for the help in advance!
     
  2. zo-digital

    zo-digital

    Joined:
    Dec 20, 2021
    Posts:
    4
    Hi, I have a similar problem.
    My project also gets stuck on opening with the "Hold on (busy for ...)" dialogue and showing hours of "ProjectBrowser.OnGUI.repaint".
    Even if I remove all scenes (so an default scene (with only Main Camera and Directional Light) gets loaded at start.
    I read on other threads, that it may have to be an issue with some Windows open. But I can't do anything. The "Hold on" dialogue prevents me from doing anything.
    Also updated to latest Unity Hub 3.0.1 and latest Unity LTS 2020.3.30f1.

    Any suggestions?
     
  3. zo-digital

    zo-digital

    Joined:
    Dec 20, 2021
    Posts:
    4
    I was able to solve this problem:
    One of these measures (or combination of it) was the solution:
    • started the Project from Unity HUB with commandline "-batchmode -nographics" and then "-batchmode". And then started the Project again without any commandlines.
    • Update PlasticSCM to Version 11.0.16
    • Disable these lighting options (have been activated last time), in the file ...Settings.lightning
      m_EnableBakedLightmaps: 0
      m_EnableRealtimeLightmaps: 0
    --> Then I was able to open my project again.
     
    Last edited: Apr 9, 2022
    AlecErikson and Pohlerbaer like this.
  4. Bmco

    Bmco

    Joined:
    Mar 11, 2020
    Posts:
    54
    (2020.3.31f1) I just had this problem. And any project already enrolled in PlasticSCM had the same problem.

    To fix it, I started a new dummy project and started using PlasticSCM. This forced the re-login. I then was able to open my existing project from Unity Hub without any issues.

    UPDATE : If you have Plastic SCM Cloud (aka the client) installed on your machine (which you should, since you need it to join other projects)...open this first and log in, THEN open your Unity Project, the OnGUI Repaint bug does not happen.
     
    Last edited: Jun 6, 2022
  5. aaronsolonmsu

    aaronsolonmsu

    Joined:
    Sep 13, 2020
    Posts:
    4
    Thank you, this saved me!
     
    tranndee likes this.
  6. Lapsapnow

    Lapsapnow

    Joined:
    Jul 4, 2019
    Posts:
    51
    Thanks. I'm damn angry Plastic's offline handling is broken, and causes stuff like this. You'd think they'd have noticed it if they had actually tested the damn thing offline.

    I have power outages, but I can run my PC on battery for the outage durations. However, without internet Plastic will bugg out, GUI.Repaint forever, and crash my Unity with 100% consistency. Utterly stupid.
     
    tranndee likes this.
  7. WARdd

    WARdd

    Joined:
    Aug 10, 2015
    Posts:
    29
    Still having this problem regularly in Unity 2020.3.30, Have to log out and back in so that plastic stops holding my projects hostage
     
  8. jdrandir

    jdrandir

    Joined:
    Jan 6, 2020
    Posts:
    1
    Does anyone know a way to fix this without being online? Maybe via adding some command line arguments when starting a project offline or something?
     
  9. FantasticGlass

    FantasticGlass

    Joined:
    May 31, 2016
    Posts:
    38
    THANK YOU! Worked like a charm.
     
  10. Kailric

    Kailric

    Joined:
    Aug 12, 2015
    Posts:
    17
    This approach still worked for me just now.
     
  11. Bmco

    Bmco

    Joined:
    Mar 11, 2020
    Posts:
    54
    My goodness, I feel like I've never helped so many people in my whole life!

    FYI, I was talking about this in the Source Control Forum. It sounds like the next version will have an "Offline Mode" that should deal with this (fingers crossed) as well as some other goofy Timeout Issues. I've also noticed some large deltas in my "Reloading Script Assemblies..." step. It could be anywhere from 5 seconds to 50. I believe this is also related to the Unity-Plastic plugin trying to connect to the Plastic servers.
     
  12. WhittS3

    WhittS3

    Joined:
    Sep 10, 2018
    Posts:
    4
    Just found this and solved my issue too, thank you!
     
  13. richiebee_hk

    richiebee_hk

    Joined:
    Mar 11, 2020
    Posts:
    1
    saved my butt TWICE
     
  14. swantonb

    swantonb

    Joined:
    Apr 10, 2018
    Posts:
    172
    Hey, if this issue is not solved for you by the above methods, what worked for me was removing unity collab proxy package from Packages>manifest