Unity的Google Play服务插件有一些错误

本文关键字:错误 插件 服务 Google Play Unity | 更新日期: 2023-09-27 18:03:32

我已经下载了Google Play Services Plugin with github和导出包在Unity(版本4.3.4f1)。但是我可以看到3个错误,它们是:

Assets/GooglePlayGames/Platforms/Android/AndroidRtmpClient.cs(491,62): error CS1502: The best overloaded method match for `GooglePlayGames.BasicApi.Multiplayer.Participant.Participant(string, string, GooglePlayGames.BasicApi.Multiplayer.Participant.ParticipantStatus, GooglePlayGames.BasicApi.Multiplayer.Player, bool)' has some invalid arguments
Assets/GooglePlayGames/Platforms/Android/AndroidRtmpClient.cs(491,62): error CS1503: Argument `#4' cannot convert `object' expression to type `GooglePlayGames.BasicApi.Multiplayer.Player'
Assets/GooglePlayGames/Platforms/Android/AndroidRtmpClient.cs(491,54): error CS1729: The type `Player' does not     contain a constructor that takes `2' arguments

请帮帮我。

Unity的Google Play服务插件有一些错误

之所以会发生这种情况,是因为我在代码和Google Play Games统一包中都定义了Player类。当我重命名我的类时,一切都如预期的那样工作。

这种情况发生是因为另一个Player类,只需检查错误在哪里并将Player更改为GooglePlayGames.BasicApi.Multiplayer.Player(这意味着脚本将从google play games脚本的错误中获得Player类)。