ソースを参照

Fixed Sync Issue Random Number

cchmc-burkewm 2 年 前
コミット
bc7312cf8f
1 ファイル変更4 行追加1 行削除
  1. 4 1
      Assets/Scripts/PhotonWaitController.cs

+ 4 - 1
Assets/Scripts/PhotonWaitController.cs

@@ -227,7 +227,10 @@ public class PhotonWaitController : MonoBehaviour
         }
         //TODO Currently Disabled For Alpha Testing To Fix Xross Issues
         //key += "_" + UnityEngine.Random.Range(0, 9999999).ToString();
-
+        int synchronizedSeed = PhotonNetwork.CurrentRoom.Name.GetHashCode() + waitCount;
+        System.Random random = new System.Random(synchronizedSeed);
+        key += "_" + random.Next(0, 9999999).ToString();
+        
         keys.Add(key);
 
         if (!GManager.instance.IsAI)