Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Weirdness after deployment to Player

Discussion in 'Editor & General Support' started by H3GS, Dec 3, 2022.

  1. H3GS

    H3GS

    Joined:
    Feb 18, 2014
    Posts:
    3
    Hey Folks,

    Working on a project with HDRP base, I've deployed earlier in the week without issue; However last night after building to Windows Player, the build succeeded with no errors or warnings but upon launching the .exe it loads the player window, shows the unity splash screen and hangs for 40-60 seconds at a white screen before displaying the initial scene.

    Now the initial scene looks how it should and operates as intended once loaded.

    I'm at a loss of what the heck has gone on. The Graphics and Shaders have not been touched since I built last; and every works great in the editor.

    Any suggestions or insight would be fantastic.

    Thanks.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,969
    Maybe attatch the profiler?
     
  3. digipaul

    digipaul

    Joined:
    Nov 24, 2018
    Posts:
    39
    Maybe its failing to contact some external website that it could contact before and timing out after 40-60 seconds. Maybe unity ads? Does an old version still work?
     
  4. H3GS

    H3GS

    Joined:
    Feb 18, 2014
    Posts:
    3
    Hey just an update. I did attach the Profiler, and it did not yield much.

    The profiler attaches no problem on startup (can see the connection), however it doesn't actually do anything until the game starts after that 'hang'. But great suggestion, should have tried that first.

    I cleared the Library and let it regen, same result.

    However I have dialed this down to being just the scene now I believe. I created a blank HDRP scene, and compiled and look at that it loaded no problem.

    The scene that's borked is just a terrain scene, and some game logic. (Again the logic works no problem in the editor)

    Something in the scene is broken, and I'll eventually round back to this thread and provide what I find. I just don't know what the 'scene' does before it talks to the profiler.

    Thanks for the help folks.
     
  5. H3GS

    H3GS

    Joined:
    Feb 18, 2014
    Posts:
    3
    So just thought id provide an update as I have now found the culprit.

    I had an FBX model that imports and works well in the editor, but its file size is about 10x bigger than what it really should be. I believe blender exported some extra data or geometry that frankly I don't need.

    Anyway, if nothing is attached to the model, the game build runs designed. Once I threw a mesh collider on it with a script to interact with it.... Absolutely kills the load time to about 40-60 seconds.

    So something funky is happening during load time with the mesh collider and this particular FBX model.

    Anyway, hope this may help someone else later on down the road. Problem solved.

    Happy Developing.