public void OnEnable()
        {
            m_ShowColliderTypeFoldout = new SavedBool("PhysicsDebugWindow.ShowColliderType", false);
            m_CurrentTab = new SavedInt("PhysicsDebugWindow.CurrentTab", 0);
            m_Collumns   = new SavedInt("PhysicsDebugWindow.Collumns", 1);

            SceneView.duringSceneGui                 += OnSceneGUI;
            Selection.selectionChanged               += UpdateSelection;
            EditorSceneManager.sceneClosed           += OnSceneClose;
            EditorSceneManager.sceneOpened           += OnSceneOpen;
            EditorApplication.playModeStateChanged   += PlayModeStateChanged;
            PhysicsDebugDraw.OnDrawPooledContacts    += DrawContacts_Internal;
            PhysicsDebugDraw.OnRetrievePooledQueries += OnQueriesRetrieved;
            PhysicsDebugDraw.BeforeSimulate          += BeforeSimulate;
            SetPickingEnabled(PhysicsVisualizationSettings.showCollisionGeometry &&
                              PhysicsVisualizationSettings.enableMouseSelect);

            LoadDictionary();
            ClearInvalidObjects();
            UpdateSelection();

            PhysicsDebugDraw.ClearAllPools();

            wantsLessLayoutEvents = true;
        }