# Pre-Processor Directives

**The code below** is called a **preprocessor directive** and is only valid if the build is for **Android** or **iOS** platform or else the compiler will ignore this code

```csharp
#if PLATFORM_ANDROID
using UnityEngine.Android;
#elif UNITY_IOS
 using UnityEngine.iOS;
#endif
```

[C# preprocessor directives | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/)

I could make 2 separate scripts, 1 for Windows & 1 for Android, but since most of the code is similar instead of repeating myself I can just implement a preprocessor directive. To see what preprocessor directives are in your Unity Project you can go to ***`File/Build Settings/Player Settings/Player/Other Settings/Scripting Define Symbols`*** *<mark style="color:orange;">**This doesn't list every available preprocessor directive, such as the**</mark>***&#x20;`PLATFORM_ANDROID`&#x20;**<mark style="color:orange;">**shown above**</mark>

![](https://3152232848-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Feasy-code-for-vivox%2F-MWHFaqQvVzjZLvdCfJT%2F-MWHXmttmXs0jBPWOxnn%2F1.jpeg?generation=1616292558697327\&alt=media)

or

***`Edit/Project Settings/Player/Other Settings/Scripting Define Symbols`***

![](https://3152232848-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Feasy-code-for-vivox%2F-MWHFaqQvVzjZLvdCfJT%2F-MWHXmtu5RCm7xMX1NGr%2F2.jpeg?generation=1616292558655263\&alt=media)
