Skip to main content
 首页 » 编程设计

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

2024年02月13日12langtianya

我已经通过 github 下载了 Google Play Services Plugin 并且 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 

请帮帮我。

请您参考如下方法:

在我的例子中,发生这种情况是因为我在我的代码和 Google Play 游戏统一包中都定义了 Player 类。当我重命名我的类(class)时,一切都按预期进行。