Unity-Technologies/UnityCsReference · error · NotSupportedException
expandedProjectWindowItems is deprecated. Use expandedProjec
Error message
expandedProjectWindowItems is deprecated. Use expandedProjectWindowItemIds instead
What it means
The expandedProjectWindowItems property is marked Obsolete(error:true) and its getters/setters throw NotSupportedException. Unity removed this API in favor of expandedProjectWindowItemIds (EntityId[]). Any code still touching the old property throws immediately.
Source
Thrown at Editor/Mono/InternalEditorUtility.bindings.cs:528
[StaticAccessor("GetApplication()", StaticAccessorType.Dot)]
extern internal static bool IsSwitchSkinRequested();
[StaticAccessor("GetApplication()", StaticAccessorType.Dot)]
[NativeMethod("RequestRepaintAllViews")]
extern public static void RepaintAllViews();
[StaticAccessor("GetInspectorExpandedState()", StaticAccessorType.Dot)]
[NativeMethod("IsInspectorExpanded")]
extern public static bool GetIsInspectorExpanded(Object obj);
[StaticAccessor("GetInspectorExpandedState()", StaticAccessorType.Dot)]
[NativeMethod("SetInspectorExpanded")]
extern public static void SetIsInspectorExpanded(Object obj, bool isExpanded);
[Obsolete("expandedProjectWindowItems is deprecated. Use expandedProjectWindowItemIds instead", true)]
public static int[] expandedProjectWindowItems
{
get { throw new NotSupportedException("expandedProjectWindowItems is deprecated. Use expandedProjectWindowItemIds instead"); }
set { throw new NotSupportedException("expandedProjectWindowItems is deprecated. Use expandedProjectWindowItemIds instead"); }
}
extern public static EntityId[] expandedProjectWindowItemIds
{
[StaticAccessor("AssetDatabase::GetProjectWindowHierarchyState()", StaticAccessorType.Dot)]
[NativeMethod("GetExpandedArray")]
get;
[FreeFunction("InternalEditorUtilityBindings::SetExpandedProjectWindowItemIds")]
set;
}
[Obsolete("LoadAssemblyWrapper is no longer supported and will be removed.", error: false)]
public static Assembly LoadAssemblyWrapper(string dllName, string dllLocation)
{
return CurrentAssemblies.LoadFromPath(dllLocation);
}
View on GitHub (pinned to 225b0fbdb5)
Solutions
- Replace all usages of expandedProjectWindowItems with expandedProjectWindowItemIds, treating the elements as EntityId.
- Recompile and update any third-party editor extensions to a version targeting the current Unity major version.
- Search the codebase for 'expandedProjectWindowItems' and remove/refactor each reference.
Example fix
// before var expanded = InternalEditorUtility.expandedProjectWindowItems; // after EntityId[] expanded = InternalEditorUtility.expandedProjectWindowItemIds;
Defensive patterns
Strategy: validation
Validate before calling
// Use the replacement API directly; never reference the obsolete property. UnityEditorInternal.InternalEditorUtility.expandedProjectWindowItemIds.ToString();
Prevention
- Treat Obsolete(error:true) APIs as compile-time removals
- Search and replace all references during Unity upgrades
- Pin editor extensions to compatible Unity versions
When it happens
Trigger: Code compiled against an older Unity editor API that reads or writes InternalEditorUtility.expandedProjectWindowItems. Reflection-based tooling that enumerates and invokes public properties. Third-party editor extensions built for an earlier Unity version.
Common situations: Upgrading a project to a Unity version where this API was removed, without recompiling affected editor packages. A custom Project window extension or asset browser plugin that cached the old property.
Related errors
- The Module Manager is deprecated
- Given rpAssetType must derive from RenderPipelineAsset
- Use cameraMode to set user-defined modes
- EditorApplication.OpenScene() cannot be called when in the U
- Check the connected players list instead
AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13).
Data as JSON: /api/errors/dbc103adf01445f0.
Report an issue: GitHub.