Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity 5 "Unrecognized assets cannot be included in AssetBundles" issue

Discussion in 'Editor & General Support' started by pstudio, Apr 3, 2015.

  1. pstudio

    pstudio

    Joined:
    Apr 20, 2014
    Posts:
    12
    Hi,

    So I am experimenting with AssetBundles in Unity 5 and I've encountered a problem I just can't figure out how to resolve.

    I have a basic folder structure as shown in this image:
    assets_folder.png
    I've tagged the folder "Core" to be part of the AssetBundle "core".

    I first tried with a small test where I only included a single sprite sheet and a few prefabs. Everything worked fine so I decided to add a bunch of extra assets. This time I added several smaller sprites (the Bricks/. folders) and gave them a sprite packing tag. I also included a few more prefabs using some of these new sprites.

    When I now try and build I get the below error message
    If I look at the bundles manifest file I can see all the assets are listed but they don't appear in the bundle when I try and load it. If I use GetAllAssetNames() or LoadAllAssets() I only get the assets that was included in the first test build. I don't get any of the new assets.

    I thought it might had something to do with using the Sprite Packer so I removed the Packing tag but although it affected the bundles file size it didn't get rid of the error messages or fixed anything.

    Can anyone possibly explain me what I might be doing wrong and what could cause the issue? I've been messing around with it for a couple of hours now and I'm running out of ideas.
     
  2. wegtsd

    wegtsd

    Joined:
    Oct 18, 2012
    Posts:
    9
    I've got the same issue!
     
  3. pstudio

    pstudio

    Joined:
    Apr 20, 2014
    Posts:
    12
    I've done some more experimenting and I did find a way to get the bundle built without the error messages. However I wouldn't call it an elegant solution but it might work for you.

    Instead of just tagging the top folder I tried to tag all the files manually. Quite tedious depending on the number of assets you want to include, but this allowed me to build the bundle and use it with no issues at all.
     
  4. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi

    Please file a bug report and we will look into it.
     
  5. Bhearus

    Bhearus

    Joined:
    Aug 17, 2013
    Posts:
    27
    Has this been resolved? I am noticing a simple class library dll with the same issue.
     
    Last edited: May 27, 2015
  6. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    56
    Last edited: Jun 15, 2015
  7. Deleted User

    Deleted User

    Guest

    Sorry to reply so late. Normally, this message is caused by the Assets which are imported by default importer.

    Is there any more information came with "Unrecognized assets cannot be included in AssetBundles" to indicate which Asset caused this problem? From Unity code side, we will output the path of the Asset.

    And could you please also file a bug with repro project? I think it's a bug we should fix.
     
  8. Andres-Fernandez

    Andres-Fernandez

    Joined:
    Feb 4, 2013
    Posts:
    57
    Is it possible to tag a folder from code? Because I'm creating the folder with an editor tool (that also creates the bundle) and whenever I create de assetbundle I get the warning on each folder contained in the assetbundle.
     
  9. mogwhy

    mogwhy

    Joined:
    Nov 20, 2014
    Posts:
    36
    i got this error when i tried to add a folder that lies within the streamingassets folder. (the plan is to load assetbundles with included websites into a webview) is this possible?

    Unrecognized assets cannot be included in AssetBundles: "Assets/StreamingAssets/setupvideo/media/skins/overlay/spritesheet.min.css".
    UnityEditor.BuildPipeline:BuildAssetBundles(String)
    CreateAssetBundles:BuildAllAssetBundles() (at Assets/AgentNapy/Scripts/AssetBundleStuff/CreateAssetBundles.cs:8)
     
    glenneroo and jackwarren like this.
  10. kelloh

    kelloh

    Joined:
    Mar 2, 2015
    Posts:
    29
    I'm getting this error building an asset bundle with a DLL. Any updates?