{"record":{"id":"9f7b94a2b1d053ce","repo":"Unity-Technologies/UnityCsReference","slug":"get-getselectionoutlineincludeexcludelist-is-obsol","errorCode":null,"errorMessage":"Get GetSelectionOutlineIncludeExcludeList is obsolete, use GetSelectionOutlineIncludeExcludeEntityIdList instead.","messagePattern":"Get GetSelectionOutlineIncludeExcludeList is obsolete, use GetSelectionOutlineIncludeExcludeEntityIdList instead\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/Handles/HandleUtility.cs","lineNumber":1238,"sourceCode":"            s_RendererExcludeBuffer.Clear();\n            s_EntityIncludeBuffer.Clear();\n            s_EntityExcludeBuffer.Clear();\n            Renderer[] deepSelection = Selection.GetFiltered<Renderer>(SelectionMode.Deep);\n            ExtractRenderersEntityIds(deepSelection, s_RendererIncludeBuffer);\n            ExtractEntities(Selection.objects, s_EntityIncludeBuffer);\n            return new PickingIncludeExcludeEntityIdList(s_RendererIncludeBuffer, null, s_EntityIncludeBuffer, null, allocator);\n        }\n\n        [Obsolete(\"Use GetPickingIncludeExcludeEntityIdList instead. This method will be removed in a future version.\", true)]\n        public static PickingIncludeExcludeList GetPickingIncludeExcludeList(Allocator allocator = Allocator.Persistent)\n        {\n            throw new InvalidOperationException(\"Get GetPickingIncludeExcludeList is obsolete, use GetPickingIncludeExcludeEntityIdList instead.\");\n        }\n\n        [Obsolete(\"Use GetSelectionOutlineIncludeExcludeEntityIdList instead. This method will be removed in a future version.\", true)]\n        public static PickingIncludeExcludeList GetSelectionOutlineIncludeExcludeList(Allocator allocator = Allocator.Persistent)\n        {\n            throw new InvalidOperationException(\"Get GetSelectionOutlineIncludeExcludeList is obsolete, use GetSelectionOutlineIncludeExcludeEntityIdList instead.\");\n        }\n\n        internal static PickingObject PickObject(Vector2 guiPosition,\n            bool selectPrefabRoot = false,\n            List<PickingObject> ignore = null,\n            List<PickingObject> filter = null)\n        {\n            Camera cam = Camera.current;\n            int layers = cam.cullingMask;\n            var screenPosition = GUIPointToScreenPixelCoordinate(guiPosition);\n            var sceneView = SceneView.lastActiveSceneView;\n            bool drawGizmos = sceneView != null && sceneView.drawGizmos;\n            PickingObject picked = PickingObject.Empty;\n\n            s_PickingInclude = filter;\n            s_PickingExclude = ignore;\n\n            if (pickClosestGameObjectDelegate != null)","sourceCodeStart":1220,"sourceCodeEnd":1256,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/Handles/HandleUtility.cs#L1220-L1256","documentation":"GetSelectionOutlineIncludeExcludeList is marked [Obsolete(..., true)] and unconditionally throws InvalidOperationException. The selection outline system migrated from int instance IDs to EntityId structs; the replacement is GetSelectionOutlineIncludeExcludeEntityIdList.","triggerScenarios":"Calling HandleUtility.GetSelectionOutlineIncludeExcludeList() from source code (compile error) or via reflection (runtime throw).","commonSituations":"Post-upgrade code or third-party packages that compute selection-outline include/exclude lists using the old int-based API.","solutions":["Replace all calls to GetSelectionOutlineIncludeExcludeList with GetSelectionOutlineIncludeExcludeEntityIdList.","Update third-party packages to versions targeting the current Unity editor.","Remove any reflection-based invocation paths."],"exampleFix":"// before\nvar list = HandleUtility.GetSelectionOutlineIncludeExcludeList(Allocator.Persistent);\n// after\nvar list = HandleUtility.GetSelectionOutlineIncludeExcludeEntityIdList(Allocator.Persistent);","handlingStrategy":"validation","validationCode":"// The [Obsolete(true)] attribute makes this a compile-time error.\n// Grep the codebase and replace:\n//   HandleUtility.GetSelectionOutlineIncludeExcludeList\n//   -> HandleUtility.GetSelectionOutlineIncludeExcludeEntityIdList","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Track Unity editor API migration guides after each major version upgrade.","Grep for GetSelectionOutlineIncludeExcludeList and replace with the EntityId variant proactively."],"tags":["obsolete","api-migration","selection-outline","entity-id","unity-editor"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}