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

Recompile + enter play mode problem

Discussion in 'Editor & General Support' started by smougie, Sep 14, 2020.

  1. smougie

    smougie

    Joined:
    Jan 15, 2020
    Posts:
    12
    Hello,

    I updated Unity to 2019.4.10f1 version and I'm getting problem with Unity Editor.
    Whenever I change script and save it, Unity is starting to recompile and problem starts when Unity finish recompiling.
    When Unity finish compiling, something is happening, some kind of window have to pop up and dissapear immediately because Unity Window is no longer "on focus" - when compiling is done and I wan't to press enter play mode shortcut I can't do this, first I have to press anywhere on Unity and than shortcut is working again.
    Here is a video, there is a "loading" animation on cursor while Unity is compiling script and after that I'm trying to press enter play mode shortcut but it doesn't work and than I'm moving mouse to click anywhere, than shortcuts work again.



    Any ideas what can cause this?
     
  2. ian-gabriel

    ian-gabriel

    Joined:
    Feb 24, 2013
    Posts:
    12
    I have disabled auto refresh in visual studio:
    Visual Studio > Tools > Options > Tools for Unity > Refresh Unity's AssetDatabase on save > False

    Then restarted my PC and everything worked ok since then.
     
  3. smougie

    smougie

    Joined:
    Jan 15, 2020
    Posts:
    12
    I'm using Visual Studio Community 2017 and there is no option like that in options o_O
    When I was using unity 2017.x there was no problem with recompile, Unity Window did not lose the focus and I could use shortcuts immidiately after switching from VS to Unity, so auto recompile is desired behaviour - I just don't want to lose Unity Window focus.
     

    Attached Files:

    • VS.png
      VS.png
      File size:
      76.1 KB
      Views:
      269
    Last edited: Sep 24, 2020