Search Issue Tracker
Fixed in 2018.2.X
Votes
0
Found in
2017.1.1f1
Issue ID
951333
Regression
No
streamingAssetsPath is not relative to UnityLoader.js
-e: Application.streamingAssetsPath is relative to the html index file loading the webgl player instead of the "UnityLoader.js" script, meaning you can't load streaming assets with the webgl player on any page not in the specific spot in the build folder that Unity puts the inex.html file in.
-repro:
--open attached project
--put the example folder on a server
--start the /index.html
--NOTICE that the streamingAssetPath relative the UnityLoader is wrong
--start the /Build/index-relative.html
--NOTICE that the streamingAssetPath relative the UnityLoader is correct
-proposed user solution:
"Example/Build/Build/RelativePathExample.js" shows how to build the streaming assets path relative to the "UnityLoader.js" file rather than the index.html file using "document.currentScript.src".
Comments (1)
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
- [Android][iOS] The keyboard closes and re-opens when consecutive input fields are selected
- Complex Sub Graph connected to a Voronoi node is ignored when the shader gets applied as a Material
- Compute Shader property not set error when entering play mode with path tracing and PBR sky
- "WebGL Publish" detects WebGL module and allows building when it is installed without restarting the project
- Editor is non-responsive and flickers when multiple Water System instances are enabled
anastrophe
May 01, 2018 08:49
how was this fixed?