|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Future<Codec> _loadAsync(FileImage key, DecoderCallback decode) { |
|
|
|
#if UNITY_ANDROID && !UNITY_EDITOR
|
|
|
|
var path = Path.Combine(Application.streamingAssetsPath, key.file); |
|
|
|
WWW unpackerWWW = new WWW(Path.Combine(Application.streamingAssetsPath, key.file)); |
|
|
|
while (!unpackerWWW.isDone) { |
|
|
|
} // This will block in the webplayer.
|
|
|
|
byte[] bytes = unpackerWWW.bytes; |
|
|
|
#else
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (bytes.Length > 0) { |
|
|
|
return decode(bytes); |
|
|
|
} |
|
|
|