Search Issue Tracker

Fixed in 2020.2.X

Votes

0

Found in

2018.4.4f1

2018.4.14f1

2019.4

2020.2

Issue ID

1220818

Regression

Yes

[Android] Assets from AssetBundles are not loaded when AssetBundle is loaded using WebRequest

Asset Bundles

-

Steps to reproduce:
1. Open users attached project in the email "AssetScriptableImporter.zip"
2. Delete the Assets/StreamingAssets/Content folder
3. Navigate to 'Assets/reimport all' a recursive error appears in the console
4. click menu 'Build/Assetbundle'
5. Enter Play mode

Expected results: A blue Sphere is loaded from an AssetBundle
Actual results: Nothing is loaded from AssetBundle

Reproducible with: 2018.4.4f1, 2019.3.3f1, 2020.1.0a25, 2020.2.0a1
Not Reproducible with: 2018.4.3f1

Note:
-Reproduces with Mono and IL2CPP
-Error "Unexpected recursive transfer of scripted class. 'Primitives.Editor.PrimitiveCreator' is being transferred while trying to transfer 'Sphere'"

Not reproducible with iPhone 8 Plus (iOS 12.2)

  1. Resolution Note (fix version 2020.2):

    User error.
    There are two issues with the project.
    First, incorrect use of Uri, the line 48 in LoadAssetObjects.cs has to be:
    string fullURL = new Uri( Path.Combine(path, localasset)).AbsoluteUri;
    note the AbsoluteUri, not AbsolutePath property at the end.

    The second issue is with the AssetBundle build script (Exporter.cs). It builds bundles passing EditorUserBuildSettings.activeBuildTarget as build target. This means that if Android is selected, the bundles are built for Android and are technically incompatible with Editor though for simple primitives may actually work, by chance, not by design.
    On latest trunk it doesn't reproduce for me in Editor, but I do believe that is the issue. In order load AssetBundle in Editor, the bundle has to be built for Standalone.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.