【发布时间】:2019-01-25 12:12:32
【问题描述】:
我正在使用 Unity 创建一个 Android 多人游戏,它使用 google play 服务。当我尝试创建一个房间时:
public void SingInAndStartMPGame(){
if (!PlayGamesPlatform.Instance.localUser.authenticated) {
PlayGamesPlatform.Instance.localUser.Authenticate ((bool success) => {
if (success) {
Debug.Log ("We are singed in, Welcome " + PlayGamesPlatform.Instance.localUser.userName);
StartMatchMaking();
} else {
Debug.Log ("We are not singed in");
}
});
} else {
Debug.Log ("You are already singed in");
StartMatchMaking ();
}
}
private void StartMatchMaking() {
PlayGamesPlatform.Instance.RealTime.CreateQuickGame (minimumOpponents, maximumOpponents, gameVariation, this);
}
我在 Logcat 中收到以下消息:
08-18 23:31:18.712: I/Unity(12810): 你已经被烧了 08-18 23:31:18.712: I/Unity(12810):
08-18 23:31:18.712:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.712: I/Unity(12810): 真 08-18 23:31:18.712: I/Unity(12810):
08-18 23:31:18.712:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723: I/Unity(12810): [Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:激活 PlayGamesPlatform。 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723:I/Unity(12810):[Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:PlayGamesPlatform 已激活:GooglePlayGames.PlayGamesPlatform 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723: I/Unity(12810): [Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:激活 PlayGamesPlatform。 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723:I/Unity(12810):[Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:PlayGamesPlatform 已激活:GooglePlayGames.PlayGamesPlatform 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723: I/Unity(12810): [Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:QuickGame:设置 MinPlayersToStart = 2 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723:I/Unity(12810):[Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:OnData 回调有地址:35 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723:I/Unity(12810):[Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:BeforeRoomCreateStartedState.IsNonPreemptable:默认情况下可抢占。 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723: I/Unity(12810): [Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:进入状态:RoomCreationPendingState 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:18.723:I/Unity(12810):[Play Games Plugin DLL] 08/18/18 23:31:18 +03:00 调试:RoomCreationPendingState.OnStateEntered:默认为无操作。 08-18 23:31:18.723: I/Unity(12810):
08-18 23:31:18.723:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:20.812: I/Unity(12810): [Play Games Plugin DLL] 08/18/18 23:31:20 +03:00 调试:输入 RealtimeManager#InternalRealTimeRoomCallback 的内部回调 08-18 23:31:20.812: I/Unity(12810):
08-18 23:31:20.812:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:20.812: I/Unity(12810): [Play Games Plugin DLL] 08/18/18 23:31:20 +03:00 调试:进入状态:ShutdownState 08-18 23:31:20.812: I/Unity(12810):
08-18 23:31:20.812:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:20.812:I/Unity(12810):[Play Games Plugin DLL] 2018 年 8 月 18 日 23:31:20 +03:00 调试:ShutdownState.OnStateEntered:默认为无操作。 08-18 23:31:20.812: I/Unity(12810):
08-18 23:31:20.812:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:20.812: I/Unity(12810):
08-18 23:31:20.812:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:20.812: I/Unity(12810): 哦哦。连接房间时遇到一些错误! 08-18 23:31:20.812: I/Unity(12810):
08-18 23:31:20.812:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51) 08-18 23:31:20.829: I/Unity(12810): [Play Games Plugin DLL] 08/18/18 23:31:20 +03:00 调试:ShutdownState.IsRoomConnected:返回房间未连接。 08-18 23:31:20.829: I/Unity(12810):
08-18 23:31:20.829:I/Unity(12810):(文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp 行:51)
任何帮助将不胜感激。
【问题讨论】:
标签: android unity3d service multiplayer playback