{"record":{"id":"85a60e33b395c52d","repo":"Unity-Technologies/UnityCsReference","slug":"getrenderersfilteringresults-readonlyspan-int-is","errorCode":null,"errorMessage":"GetRenderersFilteringResults(ReadOnlySpan<int>) is obsolete. Use GetRenderersFilteringResults(ReadOnlySpan<EntityId>) instead.","messagePattern":"GetRenderersFilteringResults\\(ReadOnlySpan<int>\\) is obsolete\\. Use GetRenderersFilteringResults\\(ReadOnlySpan<EntityId>\\) instead\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/Camera/EditorCameraUtils.bindings.cs","lineNumber":26,"sourceCode":"using Unity.Collections.LowLevel.Unsafe;\nusing UnityEngine;\nusing UnityEngine.Bindings;\nusing UnityEngine.Internal;\nusing UnityEngine.Scripting;\n\nnamespace UnityEditor.Rendering\n{\n    [NativeHeader(\"Editor/Src/Camera/EditorCameraUtils.h\")]\n    [RequiredByNativeCode]\n    public static class EditorCameraUtils\n    {\n        public static bool RenderToCubemap(this Camera camera, Texture target, int faceMask, StaticEditorFlags culledFlags)\n            => RenderToCubemapImpl(camera, target, faceMask, culledFlags) == 1;\n\n        [System.Obsolete(\"GetRenderersFilteringResults(ReadOnlySpan<int>) is obsolete. Use GetRenderersFilteringResults(ReadOnlySpan<EntityId>) instead.\", true)]\n        public static unsafe void GetRenderersFilteringResults(ReadOnlySpan<int> rendererIDs, Span<bool> results)\n        {\n            throw new System.NotImplementedException(\"GetRenderersFilteringResults(ReadOnlySpan<int>) is obsolete. Use GetRenderersFilteringResults(ReadOnlySpan<EntityId>) instead.\");\n        }\n\n        public static unsafe void GetRenderersFilteringResults(ReadOnlySpan<EntityId> rendererIDs, Span<bool> results)\n        {\n            if (rendererIDs.Length != results.Length)\n                throw new ArgumentException(\"rendererIDs and results NativeArrays don't match in length.\");\n\n            GetRenderersFilteringResultsImpl(rendererIDs, results);\n        }\n\n        [System.Obsolete(\"GetRenderersHiddenResultBits(ReadOnlySpan<int>) is obsolete. Use GetRenderersHiddenResultBits(ReadOnlySpan<EntityId>) instead.\", true)]\n        public static unsafe void GetRenderersHiddenResultBits(ReadOnlySpan<int> rendererIDs, Span<ulong> resultBits)\n        {\n            throw new System.NotImplementedException(\"GetRenderersHiddenResultBits(ReadOnlySpan<int>) is obsolete. Use GetRenderersHiddenResultBits(ReadOnlySpan<EntityId>) instead.\");\n        }\n\n        public static unsafe void GetRenderersHiddenResultBits(ReadOnlySpan<EntityId> rendererIDs, Span<ulong> resultBits)\n        {","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/Camera/EditorCameraUtils.bindings.cs#L8-L44","documentation":"EditorCameraUtils.GetRenderersFilteringResults(ReadOnlySpan<int>) is decorated with [Obsolete(..., true)] (error=true), so any use is a compile-time error. The method body also throws NotImplementedException defensively for runtime/reflective access. The API was replaced by the EntityId-based overload GetRenderersFilteringResults(ReadOnlySpan<EntityId>, Span<bool>) because renderer identifiers are now EntityIds, not raw ints.","triggerScenarios":"Calling GetRenderersFilteringResults with ReadOnlySpan<int> renderer IDs — either directly or via code that was not migrated. The obsolete marker makes this a hard error at compile time.","commonSituations":"Upgrading Unity versions where renderer IDs changed from int to EntityId; code targeting an older API surface; reflection/dynamic invocation that bypasses the compiler error.","solutions":["Switch to the EntityId overload: GetRenderersFilteringResults(ReadOnlySpan<EntityId>, Span<bool>).","Convert your int renderer IDs to EntityId values using the current conversion API before calling.","Remove all references to the int-based overload from your codebase."],"exampleFix":"// before\nEditorCameraUtils.GetRenderersFilteringResults(rendererIntIds, results);\n\n// after\nEditorCameraUtils.GetRenderersFilteringResults(rendererEntityIds, results);","handlingStrategy":"type-guard","validationCode":"// Ensure compile-time switch to the EntityId overload; remove all int-overload references.","typeGuard":"static void Call(ReadOnlySpan<EntityId> ids, Span<bool> results) => EditorCameraUtils.GetRenderersFilteringResults(ids, results);","tryCatchPattern":null,"preventionTips":["Migrate all calls to the EntityId overload.","Update tooling/packages that still use the int API.","Treat obsolete-with-error attributes as compile blockers, not warnings."],"tags":["unity","rendering","obsolete","entityid","api-migration","notimplemented"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}