- Home /
One Unity-Project for Windows, Android and IOS with specific folders for example for import Play Service Asset for Android.
Hi there,
I wanted to know if its possible to deselect folders or assets for specific platforms. In my case I've made a game for Windows and Android in one Project and switching the platform and start the game worked fine. But when I import the Play Services for Android to the Project I cant start/build etc. for Windows any more because of the Play Service folder and Scripts in there.
Is there any solution for such a problem. I don't want to create a other project for Windows because its very uncomfortable.
Thank you for your answers :)
Answer by RobAnthem · May 22, 2017 at 03:34 AM
You have to encapsulate your code into pre-processor directives that only compile if certain conditions are met. For example you can omit editor-only scripts from compiling, or android-only scripts when not compiling to android. The list of directives can be found here.
Thank you, that looks great and exactly what I need! I will give it a try :)
Your answer
Follow this Question
Related Questions
Can you embed an AR Foundation project into a web browser? 0 Answers
Making a Child/Parent Based Moving Platform? 2 Answers
how to download Asset Bundles from website to Application.dataPath across platforms ? 1 Answer
Sync assets that are built in different platforms 0 Answers
Platform pathfinding 0 Answers