Skip to content

Social SDK | Unity | Deprecated DEVELOPMENT_BUILD preprocessor warning in Social SDK Unity bindings (Discord.cs) #8505

Description

@impishlucy

Description

Importing the Social SDK Unity package (com.discord.partnersdk) with Unity 6.6+ emits a deprecation warning from the SDK's own generated bindings (Discord.cs), not from consumer project code:

com.discord.partnersdk/Runtime/Discord.cs(12187,5): warning UAC0009: DEVELOPMENT_BUILD preprocessor directive has been deprecated. Please use one of the managed code variant directives (such as DEBUG, UNITY_ENABLE_CHECKS or UNITY_INCLUDE_INSTRUMENTATION) if different code paths are desired for different managed code variants. Checking for development build is possible at runtime using Debug.isDebugBuild.

DEVELOPMENT_BUILD is going to be a legacy Mono-era conditional compilation symbol carried over from pre-CoreCLR scripting backends. Unity has flagged it deprecated in favor of DEBUG, UNITY_ENABLE_CHECKS, UNITY_INCLUDE_INSTRUMENTATION, or a runtime Debug.isDebugBuild check, and will deprecate symbols like this. These are frequently removed outright once the corresponding backend transition completes. Given Unity 6.8 targets full CoreCLR, there's a real chance DEVELOPMENT_BUILD gets stripped entirely at that point, which would turn this warning into a hard compile error for anyone at that version.

I suggest updating the internal check in Discord.cs to one of the supported directives ahead of that release, and considering a Requires Unity 6.6 or newer constraint on this package version, since compatibility with pre-6.6 CoreCLR configurations hasn't been verified.

Steps to Reproduce

Just install the sdk in Unity 6.6 or newer

Expected Behavior

no warnings

Current Behavior

warnings

Screenshots/Videos

No response

Client and System Information

MacOS 26 (M4 Macbook Air)
Unity 6.6 (6000.6.0b5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions