Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

ENABLE_AR compiler define persisting in other platforms

Discussion in 'AR' started by nickfourtimes, Jan 11, 2018.

  1. nickfourtimes


    Oct 13, 2010
    So in building our game on iOS with ARKit support, we have the ENABLE_AR symbol defined in Player Settings -> Other Settings -> Scripting Define Symbols. Specifically, we have the following defined:
    Code (CSharp):
    For our standalone build, we have fewer symbols:
    Code (CSharp):
    However, when I try to build for PC, the following code is still being executed:
    Code (CSharp):
    1. #if ENABLE_AR
    2. print("This should not print in Standalone builds.");
    3. #endif
    Is there something in the ARKit plugin that is defining ENABLE_AR before every build, regardless of platform? Is it affecting a list of globally-defined scripting symbols? Why does this code execute on a PC build?