I have an Android Game made with Unity that is succeeding and now I want to launch it for iOS.
Should I have two Unity projects, one for Android and another for iOS, or can I do it with an only project?
I use Google Play Games and I want to use Game Center for iOS, and I don't know if it all could work in a single project.
Should I have two Unity projects, one for Android and another for iOS, or can I do it with an only project?
No . You only need one project. Multiple projects will be very hard to maintain and that's unnecessary.
Use Unity's directives such as UNITY_IOS
and UNITY_ANDROID
to make Unity include your Game Center code for iOS and Google Play Games code for Android during compile-time. See Platform dependent compilation for other directives.
You can also do this during runtime by checking Application.platform
with RuntimePlatform.Android
and RuntimePlatform.IPhonePlayer
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.