I built a scene into an asset bundle using the following piece of code:
BuildPipeline.BuildAssetBundles(/*local bundle path*/, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.WebGL);
Then I uploaded the extensionless asset bundle file (not the manifest file) to my google drive and got the download link. Now when I try to download and load the scene, it works in the editor but not in the WebGL build when I run it locally in Edge. Note that I also deleted all these files which appeared after the asset bundle building from my computer, and also cleared the scene, its dependecies (one texture) and meta files from the project folder to make sure the editor really gets the bundle from the drive.
The code I use to download the bundle and load the scene in it is as the following:
IEnumerator DownloadAndSetUpSceneBundle()
{
var uwr = UnityWebRequestAssetBundle.GetAssetBundle(@bundleURL);
yield return uwr.SendWebRequest();
AssetBundle assetBundle = DownloadHandlerAssetBundle.GetContent(uwr);
string[] scenePaths = assetBundle.GetAllScenePaths();
Debug.Log(scenePaths[0]);
string sceneName = Path.GetFileNameWithoutExtension(scenePaths[0]);
SceneManager.LoadSceneAsync(sceneName);
}
It all works perfectly in the editor, but when I run the build locally using Edge, I get the following errors in the console:
*SEC7120: [CORS] The origin ‘file://’ did not find ‘file://’ in the Access-Control-Allow-Origin response header for cross-origin resource at ‘https://drive.google.com/u/0/uc?id=1iojUlUnleSAb_E4RFHTaooTC4iYiD7-n&export=download’. *
Asset Bundle download is complete, but no data have been received
Please help me. Thanks in advance!