Search Unity

Documenting PLATFORM_ANDROID

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

  1. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    1,186
    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!
     
  2. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    226
    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 ;)