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. Dismiss Notice

Emergency help with loading a level

Discussion in 'Editor & General Support' started by AliAzin, Feb 4, 2010.

  1. AliAzin

    AliAzin

    Joined:
    Jun 25, 2009
    Posts:
    51
    I have a strange problem in my project. When I click on a specific button to load a level, sometimes(10%) the game hangs.
    I have tested this on several computers but the result is the same.
    My deadline is near, and I have to solve this problem. Can someone please help me?


    Thanks in advance
     
  2. polytropoi

    polytropoi

    Joined:
    Aug 16, 2006
    Posts:
    681
    I think we'll need a bit more information. What kind of troubleshooting have you done? Can you reproduce the problem in a simple project? What does the log say? The first thing to do narrow it down - start turning things off until the problem goes away, then when you've identified the problem script, start putting debug/print statements in to see where it breaks. Most common source of hangs for me are null reference exceptions, which are usually easy to fix...
     
  3. AliAzin

    AliAzin

    Joined:
    Jun 25, 2009
    Posts:
    51
    Thanks for quick reply, I have filled that part with lots of debug logs, but as soon as pressing the button the game hangs, and nothing have been loged.

    My project is very big , with lots of models and textures.

    I had the same problem before, again on pressing a button, but not for loading a scene. But that problem solved by slightly changing the order of the pressing function. and did not understand the problem.

    About null reference problem, How can I check that without log?
     
  4. polytropoi

    polytropoi

    Joined:
    Aug 16, 2006
    Posts:
    681
    As I say, to fix the problem, you've got to identify it first, so try to isolate it by turning things off until the problem goes away, and/or make a new, simple scene and add your scripts until the problem returns.