Search Issue Tracker

Fixed in 5.6.0

Votes

32

Found in

5.2.2f1

Issue ID

741536

Regression

No

Loading an assetbundle with a GameObject that uses MonoBehaviours in .dll that was never built will result in a Missing script

Asset Bundles

-

I think the solution here involves pairing plugins and asset bundles - the user needs the plugin to unpack the DLL then the asset bundle can be handled as usual. Interesting use case, but I think also closer to an edge case.

Reproduction steps:
1. Open attached project
2. Click the menu item "Test Build/Separate Bundles For Dlls"
3. Observe emitted warnings: "Unrecognized assets cannot be included in AssetBundles: {dll file}"
4. Open the "Main" scene
5. Play the scene
6. Observe that the instantiated objects have missing MonoScript references
7. In the root of the Unity project in the folder "assetbundles/assets" open the file called "testprefab.assetbundle.manifest"
8. Observe the dependency to an assetbundle that doesn't exist

Actual result: When building a prebuilt .dll on its own in an assetbundle with the BuildPipeline.BuildAssetBundles API and then loading an assetbundle with a GameObject that uses MonoBehaviours in the .dll asset that was never built will result in a Missing MonoScript.

Expected result: The BuildPipeline.BuildAssetBundles API shouldn't emit a warning when supplied with a .dll asset, but instead build a regular assetbundle with the necessary data to enable other assetbundles to reference a MonoBehaviour or ScriptableObject in a DLL at runtime.

Comments (1)

  1. kae

    Jan 06, 2016 08:00

    As I wrote in the original issue, the desired behaviour is that the BuildPipeline.BuildAssetBundles API will not emit a warning when supplied with a .dll asset, but instead build a regular assetbundle with the necessary data to enable other assetbundles to reference a MonoBehaviour or ScriptableObject in a DLL at runtime.

    Not just "Warnings shouldn't appear"

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.