Take the 2-minute tour ×

I am building a game in Unity3D for iOS and Android. For leaderboards and achievements, I want to use GREE in Android and Gamecenter in iOS. So, when building from Unity3D, is it possible to configure in such a way that GREE libs and files are not present in XCode project and iOS have no dependancy with GREE?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In the script, you can use the Platform Dependent Compilation to control which part of code get compiled and which part not. For example, you can write something like this:

static public void showLeaderBoard()
   //Show GameCenter leader board
   //Show GREE's leader board 

Because you have just the same script for both iOS and Android, this script you write will be no issue for build. And for the purpose of preventing libs and files (I think they might all be plugin) show in wrong project folder, you can try to use the folders in your /Assets/Plugins/ folder. Put all iOS-only files to /Assets/Plugins/iOS/ and all Android-only files to /Assets/Plugins/Android/. After building for different platform, Unity will copy the files in corresponding folder to your iOS/Android project.

share|improve this answer
Thanks a lot! This might solve my issue! –  Srijith Vijayamohan Jan 16 '13 at 15:30

Your Answer


