public void ExportButton() { String path; String gamenamestring = gamename.text; Debug.Log("ExportButton"); #if UNITY_EDITOR path = @"C:\Users\holme\Desktop\もいっこ用\TableGameData\" + gamenamestring; #else path = AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\') + @"\TableGameData\" + gamenamestring; #endif if (!Directory.Exists(path)) { List <string> list = new List <string>(); Directory.CreateDirectory(path); for (int i = 0; i < ScrollViewContent.transform.childCount; i++) { Debug.Log(JsonUtility.ToJson(ScrollViewContent.transform.GetChild(i).gameObject.GetComponent <Data>())); GameObject ContentChild; ContentChild = ScrollViewContent.transform.GetChild(i).gameObject; ContentChild.GetComponent <ImageName>().MoveImage(path); list.Add(JsonUtility.ToJson(ContentChild.GetComponent <Data>())); } ControlJson.ListOutPutJson(list, path); } else { return; } Debug.Log(AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\')); SceneManager.LoadScene("Load"); }
// マスターサーバーへの接続が成功した時に呼ばれるコールバック //public override void OnConnectedToMaster() //{ // // room_nameの値の名前のルームに参加する(ルームが無ければ作成してから参加する) // if(Load.ROOM_NAME == null) // { // Load.ROOM_NAME = "room"; // } // PhotonNetwork.JoinOrCreateRoom(Load.ROOM_NAME, new RoomOptions(), TypedLobby.Default); //} // マッチングが成功した時に呼ばれるコールバック public override void OnJoinedRoom() { //GameObject obj = PhotonNetwork.Instantiate("Piece_prefab", new Vector3(0, 0, 0), Quaternion.identity); #if UNITY_EDITOR datas = ControlJson.LoadJson(@"C:\Users\holme\Desktop\もいっこ用\TableGameData\" + Load.FOLDER_NAME); #else datas = ControlJson.LoadJson(Path.Combine(AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\'), "TableGameData", Load.FOLDER_NAME)); #endif foreach (string item in datas) { Debug.Log(item); } GameObject obj_player = PhotonNetwork.Instantiate("player_ graphic", main_camera.transform.position, Quaternion.identity); main_camera.transform.parent = obj_player.transform; obj_player.AddComponent <CameraController>(); roomID.text = "RoomID:" + Load.ROOM_NAME; }