public static ContainerPlusMap CarregarPlusMap(string nomeArquivo) { var binary = new BinaryFormatter(); var file = File.Open(nomeArquivo, FileMode.Open); ContainerPlusMap pMap = (ContainerPlusMap)binary.Deserialize(file); return(pMap); }
public static void SalvarPlusMap(ContainerPlusMap plus, string nomeArquivo = "teste") { var binary = new BinaryFormatter(); var file = File.Open(Application.dataPath + "/" + nomeArquivo + ".plm", FileMode.Create); binary.Serialize(file, plus); file.Close(); }
// Start is called before the first frame update void Carregue() { ContainerPlusMap p = new ContainerPlusMap( JsonUtility.FromJson <JsonMapContainer>( SaveMap.CarregarArquivoParaJson(bPath.GetPath))); p.CreateScenario(bPath.GetFileName, xvar, yvar); //p.testeGetTexture(bPath.GetFileName, mytex); //p.MostrarCoresDoDicionario(); }
void ListarCoresDoArquivo() { ContainerPlusMap p = SaveMap.CarregarPlusMap(bPath.GetPath); p.MostrarCoresDoDicionario(); }