Copyright © 2026 Unity Technologies
Steps to reproduce:
1. Create new Unity project
2. Open Project Auditor window (Window > Analysis > Project Auditor)
3. In Project Auditor window press “Install Rules” button
4. Start Analysis
5. After Analysis go to Code > Obsolete API Database
6. Next to Search field press on “Open in Search” button
7. Enter Play Mode in the Editor
Actual results: Error “UnityException: get_skinIndex is not allowed to be called during serialization, call it from OnEnable instead. Called from ScriptableObject 'SearchWindow’.” is thrown in the Console window
Expected results: No errors are thrown in the Console window
Reproducible with versions: 6000.6.0a1, 6000.6.0a3
Can’t test with versions: 6000.5.0b4 and lower (“Open in Search” button is not available in Project Auditor window)
Tested on (OS): macOS Silicon Tahoe 26.4.1 (M1)
UnityException: get_skinIndex is not allowed to be called during serialization, call it from OnEnable instead. Called from ScriptableObject 'SearchWindow'. See "Script Serialization" page in the Unity Manual for further details. UnityEditor.EditorGUIUtility.LoadIcon (System.String name) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUIUtility.cs:808) Unity.ProjectAuditor.Editor.UI.Framework.IssueSearchProvider..cctor () (at /Users/bokken/build/output/unity/unity/Modules/ProjectAuditorEditor/UI/Framework/IssueSearchProvider.cs:18) Rethrow as TypeInitializationException: The type initializer for 'Unity.ProjectAuditor.Editor.UI.Framework.IssueSearchProvider' threw an exception. UnityEditor.Search.SearchColumnProvider.Initialize (UnityEditor.Search.SearchColumn column) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/Selectors/SearchColumn.cs:426) UnityEditor.Search.SearchColumn.InitFunctors () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/Selectors/SearchColumn.cs:252) UnityEditor.Search.SearchColumn.OnAfterDeserialize () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/Selectors/SearchColumn.cs:331) UnityEngine.StackTraceUtility:ExtractStringFromExceptionInternal(Object, String&, String&) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:50)
Issues you vote on will appear here