Unity-Technologies/UnityCsReference · warning · NotSupportedException

AA is not supported on GUIViews

Error message

AA is not supported on GUIViews

What it means

GUIView.antiAlias is an obsolete property marked [Obsolete(..., false)] that always throws NotSupportedException on set because anti-aliasing is not supported on GUI views (the supported property is antiAliasing). The throw enforces the deprecation: any code still assigning antiAlias is rejected at runtime rather than silently ignored.

Source

Thrown at Editor/Mono/GUIView.cs:210

        }

        public int depthBufferBits
        {
            get { return m_DepthBufferBits; }
            set { m_DepthBufferBits = value; }
        }

        public int antiAliasing
        {
            get { return m_AntiAliasing; }
            set { m_AntiAliasing = value; }
        }

        [Obsolete("AA is not supported on GUIViews", false)]
        public int antiAlias
        {
            get { return 1; }
            set { throw new NotSupportedException("AA is not supported on GUIViews"); }
        }

        public bool resetPanelRenderingOnAssetChange
        {
            get => m_ResetPanelRenderingOnAssetChange;
            set
            {
                if (m_ResetPanelRenderingOnAssetChange != value)
                {
                    m_ResetPanelRenderingOnAssetChange = value;
                    windowBackend?.ResetPanelRenderingOnAssetChangeChanged();
                }
            }
        }

        internal IWindowBackend windowBackend
        {
            get { return m_WindowBackend; }

View on GitHub (pinned to 225b0fbdb5)

Solutions

  1. Replace all uses of antiAlias with antiAliasing.
  2. Remove the assignment if anti-aliasing is not actually needed for the GUI view.
  3. Compile with warnings-as-errors to catch [Obsolete] usage at build time.

Example fix

// before
view.antiAlias = 4;

// after
view.antiAliasing = 4;
Defensive patterns

Strategy: type-guard

Validate before calling

// never assign the obsolete property; use the supported one
view.antiAliasing = level;

Prevention

When it happens

Trigger: Calling guiView.antiAlias = n from legacy editor code; referencing the old property name instead of antiAliasing; copying pre-upgrade sample code that sets antiAlias.

Common situations: Upgrading a project across a Unity version that renamed/obsoleted the property; third-party editor extension built against an older API; auto-generated or templated UI code.

Related errors


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