Search Unity

platform spesific code ... i@m a bit confused

Discussion in 'Android' started by whistler, Dec 26, 2014.

  1. whistler

    whistler

    Joined:
    Apr 15, 2013
    Posts:
    15
    hi all,

    anyone knows why ths code snippet works in unity_editor?

    Code (CSharp):
    1. #if UNITY_ANDROID
    2.         Debug.Log("ANDROID !");
    3. #endif
    I set platform to android in the build settings but I'm still in unity editor, so I wasnt expecting that code block gonna work in unity editor, I thought that code could only work on a real android device, but it seems that is not the case, that code block also runs in unty editor.

    can someone say me why is that so?