Search Unity

What is Editor doing after Play is stopped?

Discussion in 'Editor & General Support' started by LilGames, Aug 22, 2019.

  1. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    570
    2018.3.4f1

    The scene is complex, lots of geometry I'll admit. But I have Quality set to LOW and turned off trees, some big details etc. So I Play... takes a few seconds for the scene to appear and be playable, that's expected. Then I stop Play and... I timed it: 3.5 MINUTES the editor just sits there before returning from game view to a usable "Editor" state.

    GTX 1060 6GB
    Windows 10 64 bit
    32 MB RAM
    Intel i7 8700k

    Lighting Auto-gen is OFF
    And I signed out of my account just in case this was Collab comparing file changes. No difference!

    Now where is the CRY emoji...
     
  2. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    193
    What does the profiler say in profile editor mode? Probably one method with very high ms which would give you a hint of the reason.
     
    Peter77 likes this.
  3. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    570
    Is there a way to keep the profiler running when not in Play mode? It's not for me.
     
  4. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    193
    If it stops you're not profiling the editor. Click the profile editor button next to the Record and Deep Profile buttons and it keeps profiling for me.
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If I remember correctly, when you click Play the editor saves the current state of the open scene(s) to a temporary location. When you stop Play mode, the editor unloads all scenes then reloads the scenes from the temporary save (this is why changes to the scene get lost when you exit Play mode). That's my recollection at least. So if there's a lot of work involved with unloading the scenes from Play mode, or reloading the scene you had open before hitting play mode, that could be the source of the extra work.

    3.5 minutes is ridiculous though. I'd be looking at if this affects all scenes or just a specific scene, what the editor profiler says as already discussed, and whether the temp location or the project are using exceedingly slow storage.
     
  6. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    570
    Hmm.
    Hmm. The project AND Unity are installed on a 250MB SSD with 27MB free.

    Further to the mystery, when I check Task manager processes, Unity is the highest resource but only using about 11% CPU. The editor app itself is marked as "Not Responding" and if I wait long enough it returns to normal (but like i said above, the wait is minutes long)

    It IS just this project, so ... trying to figure out WHAT in this project is the culprit. Will look into ibbybyn's tip on profiling the editor.
     
    Joe-Censored likes this.