RuntimeManager allocates memory OnGUI even when Overlay Debug is disabled

RuntimeManager allocates memory OnGUI even when Overlay Debug is disabled. I commented out the code, and it stopped to allocate memory every frame. Unity 2018.3.12f1 and FMOD 1.10.12.

        Rect windowRect = new Rect(10, 10, 300, 100);
        void OnGUI()
        {
            if (studioSystem.isValid() && Settings.Instance.IsOverlayEnabled(fmodPlatform))
            {
                windowRect = GUI.Window(0, windowRect, DrawDebugOverlay, "FMOD Studio Debug");
            }
        }

Thanks for getting in contact with us.

We already have some changes in place for the next release to remove the garbage collection overhead in the DebugOverlay.