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

时间:2014-05-15 07:29:17

标签: c# android unity3d google-play-services

我已经使用github和。下载了Google Play服务插件 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

请帮帮我。

2 个答案:

答案 0 :(得分:2)

在我的情况下,这种情况正在发生,因为我在我的代码和Google Play Games统一包中都定义了Player类。当我重命名我的课程时,一切都按预期工作。

答案 1 :(得分:2)

这是因为另一个Player类,只是检查错误的位置,并将Player更改为GooglePlayGames.BasicApi.Multiplayer.Player(这意味着该脚本将从Google Play游戏中获取Player类)关于Google Play的错误游戏脚本。