private static void ToggleSelectionPicking(bool includeChildren)
        {
            bool shouldDisablePicking = true;

            foreach (var gameObject in Selection.gameObjects)
            {
                if (!instance.IsPickingDisabled(gameObject))
                {
                    break;
                }

                shouldDisablePicking = false;
            }

            instance.m_SelectedScenes.Clear();

            if (shouldDisablePicking)
            {
                SceneHierarchyWindow.lastInteractedHierarchyWindow.GetSelectedScenes(instance.m_SelectedScenes);

                foreach (var scene in instance.m_SelectedScenes)
                {
                    if (!instance.IsPickingDisabled(scene))
                    {
                        break;
                    }

                    shouldDisablePicking = false;
                }
            }

            var undoName = includeChildren ? "Toggle Selection And Descendants Picking" : "Toggle Selection Pickable";

            Undo.RecordObject(SceneVisibilityState.GetInstance(), undoName);
            SceneVisibilityState.SetGameObjectsPickingDisabled(Selection.gameObjects, shouldDisablePicking, includeChildren);

            foreach (var scene in instance.m_SelectedScenes)
            {
                if (shouldDisablePicking)
                {
                    instance.DisablePicking(scene);
                }
                else
                {
                    instance.EnablePicking(scene);
                }
            }

            EditorApplication.RepaintHierarchyWindow();
        }