Snapdragon Spaces enables the use of a Scripting Define Symbol via the OpenXR Project Validation.
Fixing the warning in the project validator will add a scripting define to the project settings. The project validator can be found at Project Settings > XR Plug-in Management > Project Validation. Click on Fix to add the Scripting Define Symbol to the Unity project settings.
Wait a couple of seconds for the project to recompile scripts. Afterwards the warning will go away. Clicking Fix multiple times while Unity is still recompiling scripts may result in USING_SNAPDRAGON_SPACES_SDK beeing added more than once to the list of Scripting Define Symbols.
Check the list of Scritping Define Symbols at Project Settings > Player > Other Settings > Script Compilation > Scripting Define Symbols.
The following code snippet shows how to use the scripting define symbol in a C# script.
#if USING_SNAPDRAGON_SPACES_SDK //execute only when Snapdragon Spaces is present in the project #else //execute only when Snapdragon Spaces is NOT present in the project #endif