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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Documenting PLATFORM_ANDROID

Discussion in 'Documentation' started by yasirkula, Jul 28, 2019.

  1. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,800
    Hi,

    The
    PLATFORM_ANDROID
    directive started appearing in some example codes (e.g. Android Runtime Permissions) but it is not available in the directives listed at: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

    I'm guessing that this directive is equivalent to
    !UNITY_EDITOR && UNITY_ANDROID
    . Could you add it to the PlatformDependentCompilation list? If possible, could you also tell on which Unity version this directive was introduced? This could be beneficial for Asset Store developers that would like to use this directive.

    Thanks!
     
    Endahs likes this.
  2. Deleted User

    Deleted User

    Guest

    Just found the same thing.
    If there are more platforms supporting the combination of PLATFORM_<Platform> with the meaning of !UNITY_EDITOR && <Platform>, it would be great to know (although this is already different for !UNITY_EDITOR && UNITY_WSA, which is WINDOWS_UWP, but I only know this from the coding guidelines of the MRKT)...
    Thinking about this... clean up the mess please ;)