回答編集履歴
1
貼り付けるログを間違えたので修正した
answer
CHANGED
@@ -7,14 +7,26 @@
|
|
7
7
|
なので実際のエラーを出すのは簡単で、出してみました。以下のエラーが出力されます。
|
8
8
|
|
9
9
|
```text
|
10
|
-
Operation LeaveRoom (254) not
|
10
|
+
Operation LeaveRoom (254) not allowed on current server (MasterServer)
|
11
11
|
UnityEngine.Debug:LogError(Object)
|
12
12
|
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2304)
|
13
|
-
Photon.Realtime.LoadBalancingClient:CheckIfOpCanBeSent(Byte, ServerConnection, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:
|
13
|
+
Photon.Realtime.LoadBalancingClient:CheckIfOpCanBeSent(Byte, ServerConnection, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2227)
|
14
14
|
Photon.Realtime.LoadBalancingClient:OpLeaveRoom(Boolean, Boolean) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1688)
|
15
15
|
Photon.Pun.PhotonNetwork:LeaveRoom(Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1918)
|
16
16
|
NetworkGameManager:LeaveRoom() (at Assets/_101/NetworkGameManager.cs:120)
|
17
17
|
UnityEngine.EventSystems.EventSystem:Update() (at E:/Program Files/Unity Editor/2019.3.11f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
|
18
18
|
```
|
19
19
|
|
20
|
-
エラーに
|
20
|
+
エラーメッセージに "MasterServer" とありますが、これはつまり Room のある GameServer には接続しておらず、現在は MasterServer とやり取りをしている、ということを表します。
|
21
|
+
|
22
|
+
また、以下の警告も出力されていると思います。
|
23
|
+
|
24
|
+
```text
|
25
|
+
PhotonNetwork.CurrentRoom is null. You don't have to call LeaveRoom() when you're not in one. State: Authenticating
|
26
|
+
UnityEngine.Debug:LogWarning(Object)
|
27
|
+
Photon.Pun.PhotonNetwork:LeaveRoom(Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1912)
|
28
|
+
NetworkGameManager:LeaveRoom() (at Assets/_101/NetworkGameManager.cs:120)
|
29
|
+
UnityEngine.EventSystems.EventSystem:Update() (at E:/Program Files/Unity Editor/2019.3.11f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
|
30
|
+
```
|
31
|
+
|
32
|
+
つまり現在は部屋に入っていないことを表しています。
|