Unity-Technologies/UnityCsReference · error · NotSupportedException

PlayerSettings.phoneWideTile140 is deprecated. Use GetVisual

Error message

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

What it means

PlayerSettings.WSA.phoneWideTile140 is a removed Windows Phone 8.1 visual-asset property whose accessor unconditionally throws NotSupportedException (the 1.4x phone scale is not a valid UWP asset size). Unity dropped the Windows Phone 8.1 image set when it unified on the Universal Windows Platform, so all phone* tile/icon/splash members were gutted and the error message points you at the replacement API. Visual assets must now be accessed through GetVisualAssetsImage(WSAImageType, WSAImageScale) / SetVisualAssetsImage(string, WSAImageType, WSAImageScale). The member is also annotated [Obsolete("Use GetVisualAssetsImage()/SetVisualAssetsImage()", true)], so a direct reading (get) of phoneWideTile140 is a compile-time error (CS0619); the runtime throw is only reachable through reflection or dynamic dispatch, in which case the message tells you to call GetVisualAssetsImage() instead.

Source

Thrown at Editor/Mono/PlayerSettingsWSA.cs:639

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

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

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

View on GitHub (pinned to 225b0fbdb5)

Solutions

  1. Replace the get of phoneWideTile140 with GetVisualAssetsImage(WSAImageType.UWPWide310x150Logo, WSAImageScale._150), choosing the WSAImageType that matches the phone asset (UWPWide310x150Logo) and a supported WSAImageScale.
  2. There is no exact UWP equivalent for the 1.4x phone scale: regenerate the source image at a supported UWP scale (100/125/150/200/400, or target sizes 16/24/32/48/256) and use that WSAImageScale. The _140/_180/_240 enum values are themselves [Obsolete].
  3. If the code reaches the property through reflection (e.g. enumerating PlayerSettings.WSA members), stop indexing phone* names; build an explicit name -> (WSAImageType, WSAImageScale) map and call Get/SetVisualAssetsImage instead.
  4. Let Unity's API Updater rewrite the references (or fix every CS0619 by hand) so the obsolete members are never referenced anywhere in the project.

Example fix

// before
var path = PlayerSettings.WSA.phoneWideTile140; // throws NotSupportedException

// after (UWP visual-asset API; pick the scale that matches your source image)
var path = PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.UWPWide310x150Logo, WSAImageScale._150);
Defensive patterns

Strategy: validation

Validate before calling

// Guard before touching any PlayerSettings.WSA image member by reflection:
// refuse anything the engine has hard-deprecated with [Obsolete(..., true)].
using System;
using System.Linq;
using System.Reflection;
using UnityEditor;

static bool IsSafeAssetMember(string propertyName)
{
    var prop = typeof(PlayerSettings.WSA).GetProperty(
        propertyName, BindingFlags.Public | BindingFlags.Static);
    if (prop == null) return false;
    var obs = prop.GetCustomAttribute<ObsoleteAttribute>();
    // true == treated as a compile error == always throws at runtime
    return obs == null || obs.Error != true;
}

// usage:
// if (IsSafeAssetMember("phoneSmallTile")) { ... } else { use Get/SetVisualAssetsImage }

Type guard

// Reject any deprecated Windows Phone 8.1 visual-asset name before reflecting on it.
static readonly System.Collections.Generic.HashSet<string> DeprecatedPhoneAssets =
    new System.Collections.Generic.HashSet<string>(System.Linq.Enumerable.Range(0, 0)
        .Select(_ => "")) { };

// populate once from the removed phone* set:
//   phoneAppIcon(,140,240), phoneSmallTile(,140,240), phoneMediumTile(,140,240),
//   phoneWideTile(,140,240), phoneSplashScreenImage(Scale140/180), phoneSplashScreenImage
static bool IsDeprecatedPhoneAsset(string name) =>
    name != null && name.StartsWith("phone", System.StringComparison.Ordinal);

Try / catch

// Only meaningful for reflection/dynamic access (direct use is CS0619).
try
{
    _ = typeof(PlayerSettings.WSA)
            .GetProperty("phoneSmallTile", BindingFlags.Public | BindingFlags.Static)
            .GetValue(null, null);
}
catch (NotSupportedException ex) when (ex.Message.Contains("deprecated"))
{
    // a hard-deprecated member: fall through to GetVisualAssetsImage/SetVisualAssetsImage
    UnityEngine.Debug.LogWarning($"Skipped deprecated PlayerSettings.WSA member: {ex.Message}");
}

Prevention

When it happens

Trigger: Executing the get accessor of PlayerSettings.WSA.phoneWideTile140 (the deprecated region throws in both branches). For example: var path = PlayerSettings.WSA.phoneWideTile140; // get runs the accessor body, which immediately does `throw new NotSupportedException(...)`. Because [Obsolete(...,true)] turns the call into CS0619, normal compiled C# cannot reach it; the throw fires when the property is touched via reflection (PropertyInfo.GetValue/SetValue) or a dynamic/member-access path that bypasses the compiler check.

Common situations: Upgrading a project from a Unity version that still supported Windows Phone 8.1 (the phone* setters existed and worked); legacy editor scripts, build pipelines, or CI that configured phone tile/icon/splash assets; third-party plugins/extensions that enumerate or set PlayerSettings.WSA image members by name; reflection-based PlayerSettings automation; forum/wiki/Asset Store snippets copied before the UWP migration. The throw also surfaces during automated tests or tooling that round-trips every PlayerSettings property.

Related errors


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