Unity-Technologies/UnityCsReference · error · NotSupportedException

PlayerSettings.phoneSplashScreenImage is deprecated. Use…

Error message

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

What it means

PlayerSettings.WSA.phoneSplashScreenImage is a removed Windows Phone 8.1 visual-asset property whose accessor unconditionally throws NotSupportedException (the 1x 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 phoneSplashScreenImage 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.

Solutions

  1. Replace the get of phoneSplashScreenImage with GetVisualAssetsImage(WSAImageType.SplashScreenImage, WSAImageScale._100), choosing the WSAImageType that matches the phone asset (SplashScreenImage) and a supported WSAImageScale.
  2. Confirm the asset path/size matches the UWP visual-asset contract (UWP wants specific pixel dimensions per WSAImageType); the old phone tiles do not map 1:1, so re-export the art for the UWP logo size.
  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.phoneSplashScreenImage; // throws NotSupportedException

// after (UWP visual-asset API; pick the scale that matches your source image)
var path = PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.SplashScreenImage, WSAImageScale._100);
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.phoneSplashScreenImage (the deprecated region throws in both branches). For example: var path = PlayerSettings.WSA.phoneSplashScreenImage; // 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/000d5d94d01c151e. Report an issue: GitHub.

Appendix: source

Thrown at Editor/Mono/PlayerSettingsWSA.cs:667

            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.");
                }
            }

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

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

View on GitHub (pinned to 225b0fbdb5)