Unity-Technologies/UnityCsReference · error · NotSupportedException

PlayerSettings.phoneSplashScreenImageScale240 is deprecated.

Error message

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

What it means

PlayerSettings.WSA.phoneSplashScreenImageScale240 was a string property that retrieved the Windows Phone splash screen image path at 240% scale. Unity consolidated per-scale visual asset getters into GetVisualAssetsImage(WSAImageType, WSAImageScale). The [Obsolete(..., true)] attribute blocks direct compilation; the NotSupportedException fires for reflection-based reads.

Source

Thrown at Editor/Mono/PlayerSettingsWSA.cs:695

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

            [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
            [Obsolete("Use GetVisualAssetsImage()/SetVisualAssetsImage()", true)]
            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.");

View on GitHub (pinned to 225b0fbdb5)

Solutions

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

Example fix

// before
string img = PlayerSettings.WSA.phoneSplashScreenImageScale240;

// after
string img = PlayerSettings.WSA.GetVisualAssetsImage(WSAImageType.SplashScreenImage, WSAImageScale._200);
Defensive patterns

Strategy: validation

Validate before calling

var prop = typeof(PlayerSettings.WSA).GetProperty("phoneSplashScreenImageScale240");
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.phoneSplashScreenImageScale240 via reflection (PropertyInfo.GetValue), dynamic dispatch, or a legacy compiled assembly.

Common situations: Editor tools inspecting WSA splash screen configuration across DPI scales. Legacy project validation scripts. Plugins built against pre-2018 Unity API.

Related errors


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