Unity-Technologies/UnityCsReference · error · NotSupportedException

PlayerSettings.packageLogo140 is deprecated. Use GetVisualAs

Error message

PlayerSettings.packageLogo140 is deprecated. Use GetVisualAssetsImage() instead.

What it means

PlayerSettings.WSA.packageLogo140 was a string property that retrieved the UWP package logo image path at 140% scale. Unity replaced all per-scale visual asset getters with GetVisualAssetsImage(WSAImageType, WSAImageScale). The [Obsolete(..., true)] attribute blocks direct compilation; the NotSupportedException fires for reflection-based reads.

Source

Thrown at Editor/Mono/PlayerSettingsWSA.cs:709

            public static string phoneSplashScreenImageScale240
            {
                get
                {
                    throw new NotSupportedException("PlayerSettings.phoneSplashScreenImageScale240 is deprecated. Use GetVisualAssetsImage() instead.");
                }
                set
                {
                    throw new NotSupportedException("PlayerSettings.phoneSplashScreenImageScale240 is deprecated. Use SetVisualAssetsImage() instead.");
                }
            }

            [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
            [Obsolete("Use GetVisualAssetsImage()/SetVisualAssetsImage()", true)]
            public static string packageLogo140
            {
                get
                {
                    throw new NotSupportedException("PlayerSettings.packageLogo140 is deprecated. Use GetVisualAssetsImage() instead.");
                }
                set
                {
                    throw new NotSupportedException("PlayerSettings.packageLogo140 is deprecated. Use SetVisualAssetsImage() instead.");
                }
            }

            [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
            [Obsolete("Use GetVisualAssetsImage()/SetVisualAssetsImage()", true)]
            public static string packageLogo180
            {
                get
                {
                    throw new NotSupportedException("PlayerSettings.packageLogo180 is deprecated. Use GetVisualAssetsImage() instead.");
                }
                set
                {
                    throw new NotSupportedException("PlayerSettings.packageLogo180 is deprecated. Use SetVisualAssetsImage() instead.");

View on GitHub (pinned to 225b0fbdb5)

Solutions

  1. Replace the getter with PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.PackageLogo, WSAImageScale._140)
  2. Migrate to UWP-supported scales (_100, _125, _150, _200, _400) since _140 is deprecated for UWP
  3. Update reflection-based code to call the method API directly

Example fix

// before
string logo = PlayerSettings.WSA.packageLogo140;

// after
string logo = PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.PackageLogo, WSAImageScale._150);
Defensive patterns

Strategy: validation

Validate before calling

var prop = typeof(PlayerSettings.WSA).GetProperty("packageLogo140");
if (prop?.GetCustomAttribute<System.ObsoleteAttribute>()?.IsError == true)
    Debug.LogError("Property is obsolete. Use GetVisualAssetsImage() instead.");

Try / catch

try { /* deprecated getter via reflection */ }
catch (NotSupportedException ex) when (ex.Message.Contains("GetVisualAssetsImage"))
{ Debug.LogError("Migrate to GetVisualAssetsImage()."); }

Prevention

When it happens

Trigger: Reading PlayerSettings.WSA.packageLogo140 via reflection (PropertyInfo.GetValue), dynamic dispatch, or a legacy compiled assembly calling the getter.

Common situations: Editor tools that display the currently configured package logo at various scales. CI scripts validating WSA visual asset configuration. Migration from older Unity project formats.

Related errors


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