Created
July 25, 2012 17:31
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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