BBGamelib.FileUtils.ReadBytesFromStreamAssets C# (CSharp) Method

ReadBytesFromStreamAssets() public static method

public static ReadBytesFromStreamAssets ( string file ) : byte[]
file string
return byte[]
		public static byte[] ReadBytesFromStreamAssets(string file){
			string filePath = System.IO.Path.Combine(Application.streamingAssetsPath, file);
			byte[] result = null;
			if (filePath.Contains("://")) {
				WWW www = new WWW(filePath);
				while(!www.isDone){}
				result = www.bytes;
			} else
				result = System.IO.File.ReadAllBytes(filePath);
			return result;
		}