Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. 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?