Unity-Technologies/UnityCsReference · error · NotImplementedException

Facebook support was removed in 2019.3

Error message

Facebook support was removed in 2019.3

What it means

Thrown by every property accessor in PlayerSettings.Facebook (sdkVersion, appId, useCookies, etc.) because the entire Facebook platform class is marked [Obsolete(..., true)] — meaning it is a compile-time error to reference it, and at runtime all members throw NotImplementedException. Facebook platform support was removed from Unity in version 2019.3 and this stub class remains solely for API surface compatibility.

Source

Thrown at Editor/Mono/PlayerSettingsFacebook.bindings.cs:20

// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Collections;
using UnityEngine.Bindings;

namespace UnityEditor
{
    public partial class PlayerSettings : UnityEngine.Object
    {
        [Obsolete("Facebook support was removed in 2019.3", true)]
        public partial class Facebook
        {
            public static string sdkVersion
            {
                get { throw new NotImplementedException("Facebook support was removed in 2019.3"); }
                set { throw new NotImplementedException("Facebook support was removed in 2019.3"); }
            }

            public static string appId
            {
                get { throw new NotImplementedException("Facebook support was removed in 2019.3"); }
                set { throw new NotImplementedException("Facebook support was removed in 2019.3"); }
            }

            public static bool useCookies
            {
                get { throw new NotImplementedException("Facebook support was removed in 2019.3"); }
                set { throw new NotImplementedException("Facebook support was removed in 2019.3"); }
            }

            internal static bool useLogging
            {
                get { throw new NotImplementedException("Facebook support was removed in 2019.3"); }

View on GitHub (pinned to 225b0fbdb5)

Solutions

  1. Remove all references to PlayerSettings.Facebook from your code and assets — Facebook is no longer a supported build target.
  2. If you need Facebook integration, use the Facebook SDK for Unity which operates at the application level, not the platform settings level.
  3. For pre-compiled assemblies referencing the type, recompile them against your current Unity version or request an updated version from the asset publisher.

Example fix

// before
var sdk = PlayerSettings.Facebook.sdkVersion;

// after
// Remove the call entirely — Facebook platform support was removed in Unity 2019.3.
Defensive patterns

Strategy: validation

Validate before calling

// This class is obsolete and throws on all access. Remove all references:
// var sdk = PlayerSettings.Facebook.sdkVersion; // REMOVETHIS
// If Facebook integration is needed, use the Facebook SDK for Unity instead.

Prevention

When it happens

Trigger: Any access to PlayerSettings.Facebook.* properties (sdkVersion, appId, useCookies, etc.) at runtime. Due to the Obsolete attribute with error=true, this is also a compile error in modern Unity — the runtime throw exists as a fallback for pre-compiled assemblies that still reference the type.

Common situations: Legacy project upgrading from Unity 2019.2 or earlier that references PlayerSettings.Facebook; pre-compiled plugins or assets that were built against an old Unity API surface; automated tooling or build scripts that enumerate all platform settings without filtering removed platforms.

Related errors


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