Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Really slow to enter play mode

Discussion in '2017.1 Beta' started by makeshiftwings, May 2, 2017.

  1. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Entering play mode in my scene was pretty snappy in 5.6, but it is incredibly slow in 2017.1. It won't start for 30-40 seconds after I hit play. Anyone else seeing this? Is there anything that usually causes this type of slowdown?
     
    Paul-Swanson and TimRad96 like this.
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I've had it with other versions and although I didnt track it down properly I'm sure it was project-specific and related to some assets/code I had in the project.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    You can use the Unity Profiler to find out where Unity spends those 30 seconds. I created a video that shows how to use the Profiler to do this.



    And here it's as text:
    1. Open Window/Profiler
    2. Turn on "Record" and "Profile Editor" in Profiler Window
    3. Press PLAY to start game
    4. Turn off "Record" button when game started and data is sent to Profiler
    5. Select slow sample in Profiler in the "CPU Usage" time-line
    6. Use the "Overview" list in the Profiler to see what is causing the slow-down
    The "Overview" should then show what code is causing those 30 seconds delay.
     
  4. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I had looked at the profiler but wasn't sure what to make of it since it was spending all of its time in "ReloadingAssmeblies". I figured it out eventually... ScriptInspector from the asset store apparently does not play well in 2017.1 with the .NET 4.6 runtime, and was doing some sort of weird recompile every time I entered play mode. Getting rid of Script Inspector got rid of almost all the slow down.
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @makeshiftwings

    Is the slowness only with .NET 4.6? Or does it also happen with .NET 2.0?
     
    OWL7seven likes this.