IEnumerator LoadGoogleSheetData() { Debug.Log("LOADING DATA"); spreadSheetManager = new SpreadSheetManager(); yield return(null); spreadSheetFromName = spreadSheetManager.LoadSpreadSheet("Chef Dolores VR"); worksheetFromName = spreadSheetFromName.LoadWorkSheet("RemConfig"); CellData cellData = worksheetFromName.GetCellData("B", 2); CellData versionNumber = worksheetFromName.GetCellData("B", 3); Debug.Log(cellData.value.ToString()); switch (cellData.value) { case "1": hasBeenPaid = true; messageText.text = "Cargando datos..."; versionText.text = "Ver. " + versionNumber.value; break; case "Yes": hasBeenPaid = true; messageText.text = "Cargando datos..."; versionText.text = "Ver. " + versionNumber.value; break; default: hasBeenPaid = false; messageText.text = "Error: C0D_05"; versionText.text = "Ver. " + versionNumber.value; break; } }
public void AddResultsToSheet() { int myRandom = Random.Range(0, 30); GS2U_Worksheet gameplaysWorksheet = haribo_spreadsheet.LoadWorkSheet("gameplays"); gameplaysWorksheet.AddRowData(new Dictionary <string, string> { { "nombre", GameDataScript.instance.nombre }, { "paterno", GameDataScript.instance.apellido_paterno }, { "materno", GameDataScript.instance.apellido_materno }, { "tiros", "30" }, { "detenidos", myRandom.ToString() }, { "goles", (30 - myRandom).ToString() }, { "puntos", GameDataScript.instance.puntos.ToString() }, { "fecha", System.DateTime.Now.ToString("dd/MM/yyyy") }, { "hora", System.DateTime.Now.TimeOfDay.ToString() } }); Boot_Script.instance.test_int++; }