public void SaveMine() { Minas mina = GameObject.FindGameObjectWithTag("Minas").GetComponent <Minas>(); mina.mapas.Add(mina.contador, mapa); mina.contador++; SceneManager.LoadScene("Main", LoadSceneMode.Single); }
public void Guardar() { Minas minas = GameObject.FindGameObjectWithTag("Minas").GetComponent <Minas>(); var path = EditorUtility.SaveFilePanel( "Save texture as PNG", "", "Mina.json", "json"); File.WriteAllText(path, minas.GetJson()); }
private void Awake() { if (mina == null) { mina = this; DontDestroyOnLoad(gameObject); } else if (mina != this) { Destroy(gameObject); } mapas = new Dictionary <int, Dictionary <int, Dictionary <int, string> > >(); contador = 0; }