猴子原創,歡迎轉載。轉載請註明: 轉載自Cocos2Der-CSDN,謝謝!
原文地址: http://blog.csdn.net/cocos2der/article/details/48313653
最近遊戲剛接完Google Play Game,結果發現加入Google Play Game Unity Plugins 之後,導出Xcode工程之後,會默認加入Google Play的iOS版。
然而,我們並不希望iOS版加入Google Play的模塊。咱們來看看如何移除Google Play Game iOS。
翻了下Google Play Game Plugins的代碼,發現其實別人已經增加了宏定義選項來關閉iOS版導出。下面的NO_GPGS定義就是用來關閉iOS版的。
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
定義NO_GPGS,用來關閉其iOS模塊:
- Build Setttings-iOS-Player Settings-Other Setttings,在Scripting Define Symbol中添加NO_GPGS
- 移除Plugins/iOS下相關iOS文件(版本不同可能文件不一樣):
- CustomWebViewApplication.h
- CustomWebViewApplication.mm
- GPGSAppController.h
- GPGSAppController.mm
Ok,這樣就完成了,是不是很簡單。