Search Issue Tracker
By Design
Votes
0
Found in
2017.1.0a6
Issue ID
898820
Regression
Yes
[OSX][WWW] www.bytes returns null on mac
How to reproduce:
1. Open the attached project
2. Open and play test scene
Actual result: notice NullReferenceException in console
Expected result: www.bytes returns bytes and AssetBundle is loaded
Issue doesn't exist on Windows. Also it is not related to AssetBundles, I have tried loading text file, www.bytes still returns null.
Reproducible: 2017.1.0b1
Not reproducible: 2017.1.0a6
By Design:
This is because we made WWW to be a wrapper on top of UnityWebRequest and we are sticter in terms of URL validation.
This line is correct in Windows, but not OSX:
wwwPath = "file:///" + Application.streamingAssetsPath + "/iOS/" +assetBundleName;
because it result in Uri with 4 slashes after file:.
The correct way for this is:
new Uri(Application.streamingAssetsPath + "/iOS/" +assetBundleName, UriKind.Absolute).AbsoluteUri
This would result in proper URI under both Windows and OSX.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
bariscigal
Dec 09, 2017 11:19
I am having this exact problem. The "solution" is as cryptic as the problem itself.
I can get www.bytesDownloaded but not www.bytes[] .
Why is this "by design" ?
Please update the api document as needed.