Search Unity

Problems on Initial Load

Discussion in 'Editor & General Support' started by Calamitycal, Jan 16, 2019.

  1. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    I'm having an issue in my game where the first time someone installs and creates a character and then enters the world, the scene loads looks like this:



    When it should look like this:



    The game doesn't crash, it just fails to load everything properly. Upon closing the game and restarting everything loads fine and it never happens again. Checking the output_log there are no errors or differences in a log that loads properly vs. one that doesn't. On a fresh PC I got it to happen the first time after installing, but I can't reproduce it even after uninstalling and reinstalling.

    Any ideas as to where to start or what might cause this?
     
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Invalid script execution order might cause this.

    Make sure there no race condition between UI and your character initialization.
     
  3. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    Thanks, I'll take a look and see if I can find the problem there.

    Just can't get it to happen again even after uninstalling so won't really know if it worked!
     
  4. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    So after doing some tinkering I've narrowed this down to something in the registry.

    If I delete everything in the registry, the bug occurs. Then closing and restarting the game, everything is fine.

    Specifically, if I delete UnityGraphicsQuality_h the bug occurs again. Then closing and restarting the game, everything is fine.

    I'm not sure what would cause that. Any ideas?
     
  5. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    Figured it out. Was related to the UnityGraphicsQuality file in the registry. On first load, that file wasn't being created properly and that's why the game looks all messed up. The file would then be saved and that's why it only occurred on first load. Forcing the quality setting to save immediately on start up solved the problem.