Skip to content

Instantly share code, notes, and snippets.

@Matheus-de-Souza
Created July 25, 2012 17:31
Show Gist options
  • Save Matheus-de-Souza/3177414 to your computer and use it in GitHub Desktop.
Save Matheus-de-Souza/3177414 to your computer and use it in GitHub Desktop.
Métodos que não funcionam com o iPhone na Unity e seus workarounds
class Fake
{
void fake()
{
//Methods from Path class doesn't works for Unity
//Problem
string directory = Path.GetDirectoryName(filepath);
//Workaround
filepath = filepath.Replace("\\","/");
string directory = filepath.Substring (0, filepath.LastIndexOf ('/') + 1);
//Problem
BinaryFormatter doesn't works
//Workaround
Use XmlWriter do save and Serializer to load but don't forget the garbage => data = data.Substring(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment