Unity-Technologies/UnityCsReference · error · NotSupportedException

PlayerSettings.phoneAppIcon is deprecated. Use GetVisualAsse

Error message

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

What it means

PlayerSettings.WSA.phoneAppIcon is a deprecated static property getter that always throws NotSupportedException. The base-scale Windows Phone app icon property was consolidated into GetVisualAssetsImage(WSAImageType, WSAImageScale) with type WSAImageType.UWPSquare44x44Logo. It is [Obsolete(..., true)] and [EditorBrowsable(Never)].

Source

Thrown at Editor/Mono/PlayerSettingsWSA.cs:499

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

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

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

View on GitHub (pinned to 225b0fbdb5)

Solutions

  1. Replace with PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.UWPSquare44x44Logo, WSAImageScale._100).
  2. Migrate all phoneAppIcon* variants (base, 140, 240) together.
  3. Update plugin DLLs that reference the deprecated getter.

Example fix

// before
string path = PlayerSettings.WSA.phoneAppIcon;

// after
string path = PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.UWPSquare44x44Logo, WSAImageScale._100);
Defensive patterns

Strategy: type-guard

Validate before calling

// Use the new getter for app icon at base scale
string path = PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.UWPSquare44x44Logo, WSAImageScale._100);

Type guard

static bool IsDeprecatedWsaProperty(string name) =>
    typeof(PlayerSettings.WSA)
        .GetProperty(name,
            System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static)
        ?.GetCustomAttribute<ObsoleteAttribute>()?.IsError == true;

Prevention

When it happens

Trigger: Reading PlayerSettings.WSA.phoneAppIcon (the getter) in editor scripts, build reports, or configuration inspectors. Direct C# access is a compile error; runtime hits come from reflection or SerializedProperty traversal.

Common situations: Migrating a Windows Phone 8 / Windows 8.1 project to UWP; plugins that read the app icon path; upgrading Unity and finding stale property references in build tooling.

Related errors


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