- Home /
CrossPlatform Project with non-CrossPlatform plugins
I recently began trying to port my android game to other platforms and I've run into an annoyance.
As a single example. I have an admob plugin in my project that works only for android so in order to build the project for another platform such as Windows 8 store I need to delete the object from my scene, remove the code from my script and essentially wipe out all traces of the plugin from my project.
My current solution is to have 2 completley seperate projects but that is not ideal when I start making changes to the game iteself.
How do other people handle using plugins that are platform specific in crossplatform projects?
Answer by Andre Barbosa · Aug 05, 2013 at 05:48 PM
You don't need to remove any code or remove plugins...just add macros:
#if UNITY_ANDROID
Use Android plugin
#endif
#if UNITY_IPHONE
Use iOS plugin
#endif
Your answer

Follow this Question
Related Questions
GPGS Reporting score/progress doesn't work 0 Answers
Unity plugin setting issue: DllNotFoundException 0 Answers
Plugins colliding with each other. 0 Answers
Game Thrive (One Signal) causes game to crash when calling init method. 1 Answer
How do I implement In-App purchases for Windows/Windows Phone? 2 Answers