OK today out of the blue I was doing what I normally do, just working on my game (This project is > 10 years with over 100k LOC)
suddenly the editor paused when I press Play because of the Unity Editor Function SetPausemodeLayout()
weird, try it again, same thing … recheck what I was working on, nothing important, restart unity, same thing, it pauses
I tracked it down to it getting called whenever there is a Debug.Log(), print(), Debug.LogFormat() etc
OK I reboot the PC, Problem still persists,
I try a totally separate scene from different scene, it also stops at SetPausemodeLayout() when Debug.Log()
Gah so Unity has somehow become corrupted!
Anyone seen anything like this before and how to proceed?
Right now
I’ve made a backup, and now are installing Unity 6 latest recommended version, and are going to see if it works with that, not happy cause I know from experience, a lot of things are prolly gonna break. FWIW I was using 2022.2.20
Any other advice, perhaps I somehow switched on something inadvertently in the editor? I’ve googled (even asked chatgpt) seems this problem hasn’t occured before, btw I did try Reset editor layout etc
cheers Zed
EDIT: Wow upgraded to latest Unity version and its still happening!
I press play and it’s pausing here
UnityEditor.EditorApplicationLayout:SetPausemodeLayout ()
Why? How can I possibly see whats calling this?
Last lines from editor Log
000.0 1 OnApplicationFocus:False
UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
GLOBALS:Log (string) (at Assets/CLASSES/App.cs:979)
App:OnApplicationFocus (bool) (at Assets/CLASSES/App.cs:528)
UnityEditor.PlayModeView:SetFocus (bool)
UnityEditor.GameView:OnLostFocus ()
UnityEditor.HostView:OnLostFocus ()
UnityEditor.HostView:DeregisterSelectedPane (bool,bool,bool)
UnityEditor.HostView:SetActualViewInternal (UnityEditor.EditorWindow,bool)
UnityEditor.DockArea:SetSelectedPrivate (int,bool)
UnityEditor.DockArea:set_selected (int)
UnityEditor.EditorWindow:ShowTab ()
UnityEditor.WindowLayout:TryFocusAppropriateWindow (bool)
UnityEditor.WindowLayout:ShowAppropriateViewOnEnterExitPlaymode (bool)
UnityEditor.EditorApplicationLayout:SetStopmodeLayout ()
UnityEditor.EditorApplicationLayout:SetPausemodeLayout ()