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

  1. Replace all usages of expandedProjectWindowItems with expandedProjectWindowItemIds, treating the elements as EntityId.
  2. Recompile and update any third-party editor extensions to a version targeting the current Unity major version.
  3. 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

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


AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13). Data as JSON: /api/errors/dbc103adf01445f0. Report an issue: GitHub.