BBGamelib.FileUtils.ReadTextFileFromStreamAssets C# (CSharp) Method

ReadTextFileFromStreamAssets() public static method

public static ReadTextFileFromStreamAssets ( string path, ZipDelegate zip = null ) : string
path string
zip ZipDelegate
return string
		public static string ReadTextFileFromStreamAssets(string path, ZipDelegate zip=null){
			string filePath = System.IO.Path.Combine(Application.streamingAssetsPath, path);
			string result = null;
			if (filePath.Contains("://")) {
				result = ReadTextFileFromURL(filePath, zip);
			} else{
				result = ReadStringFromPath(path);
				if (zip != null)
					result = zip.unZip (result);
			}
			return result;
		}
		

Usage Example

Beispiel #1
0
        public static NSDictionary DictionaryWithContentsOfFileFromStreamAssetss(string path, FileUtils.ZipDelegate zip = null)
        {
            string text = FileUtils.ReadTextFileFromStreamAssets(path);

            if (zip != null)
            {
                text = zip.unZip(text);
            }
            return(DictionaryWithContentsOfString(text, zip));
        }
All Usage Examples Of BBGamelib.FileUtils::ReadTextFileFromStreamAssets