Last active
December 14, 2017 05:03
-
-
Save ginxx009/705184ceaa94156cdb647fff2621ae02 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//ANDROID PLATFORM | |
string json = null; | |
string full_path = Application.streamingAssetsPath + "filename"; | |
// Android only use WWW to read file | |
WWW reader = new WWW(full_path); | |
//wait until the download is done | |
while (!reader.isDone){} | |
json = reader.text; | |
//STANDLONE PLATFORM | |
string json = null; | |
string full_path = Application.streamingAssetsPath + "filename"; | |
StreamReader reader = new StreamReader(full_path); | |
json = reader.ReadToEnd().Trim(); | |
reader.Close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment