在 IOS 平台中找不到 PlayGamesPlatform

PlayGamesPlatform could not be found in IOS platform

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

您可以使用 Unity Platform Dependent Compilers Platform dependent compiler 。使用 Google Play Store IAP 时,使用 if UNITY_ANDROID then add play store code inside。对于 IOS 使用 UNITY_IOS.