IOS平台找不到PlayGamesPlatform

问题描述

我目前在 Google Play 商店中发布了一款可运行的 android 游戏,其中包含应用内购买和成就。我想为IOS制作一个新版本。但是当换平台到IOS时,显示PlayGamesPlatform Could not be found错误。我是否必须删除与 google play 相关的所有脚本,或者有没有办法让它们同时用于 android 和 IOS 使用条件?我还尝试在脚本定义符号中添加 NO_GPGS,但仍然显示错误

解决方法

您可以使用 Unity 平台相关编译器 Platform dependent compilation 。使用 Google Play Store IAP 时,如果使用 UNITY_ANDROID 然后在里面添加 Play 商店代码。对于 IOS,请使用 UNITY_IOS。