Search Unity

Package Assets Not Included in Asset Bundles

Discussion in 'Package Manager' started by deemen, Feb 21, 2019.

  1. deemen

    deemen

    Joined:
    Dec 29, 2013
    Posts:
    17
    Any assets located in Packages but referred to by asset bundles in the main Assets folder do not seem to get included in the asset bundle like other dependencies usually do. For example, if a prefab in the Assets folder references a shader in the Packages folder. The prefab is included in the bundle but the shader is not. This is despite the fact that selecting the prefab and choosing "Select Dependencies" will correctly highlight the shader in the Packages folder.

    This problem was found while working with the Post Processing package in a game that makes heavy use of asset bundles. See full bug report here: https://github.com/Unity-Technologies/PostProcessing/issues/766

    In that particular instance there is a workaround with the Graphics settings, but in general I think this reduces the usefulness of packages anything other than Scripts.
     
  2. mathieur

    mathieur

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    31
    I can confirm that this is the case and have filed a bug under https://jira.hq.unity3d.com/browse/PAX-840. We will see if this behaviour can be corrected. It does seem like this should work as there should be little difference between assets under Assets and assets under Packages.
     
  3. deemen

    deemen

    Joined:
    Dec 29, 2013
    Posts:
    17
    Thanks, looking forward to fix!
     
  4. deemen

    deemen

    Joined:
    Dec 29, 2013
    Posts:
    17
    As a secondary (and possibly worse) problem, when we copy the package assets into the project they can get referenced by multiple asset bundles leading to the assets being copied into each. For shaders the loading / unloading of duplicate shaders seems to break materials and rendering. We spent the last 2-3 days tracking this down. So if this bug is fixed, users must be able to choose which bundle the package assets go into in order to avoid asset duplication.
     
  5. mathieur

    mathieur

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    31
    Very good point! Thank you for bringing it up. I made a note of it, and we will be sure to take this into consideration when creating the fix.
     
  6. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Any news on this? We also use asset bundles heavily and the post processing shaders are very prone to breaking in builds since we are including them through the package manager
     
  7. ShadowLairGames

    ShadowLairGames

    Joined:
    Jan 17, 2019
    Posts:
    45
    Mega bump, but isn't this still the case a year and a half later?

    I still find myself having to copy packages from Packages to Assets just to be able to properly bundle them, and this goes back to something as basic as TextMesh Pro.

    And this is very worrying given the announcement that the TECH-stream would be reduced to 2 releases per year due to the fact that most new features will be released as packages instead.
     
  8. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Hey there!

    We do see the bug report with the team but is still in the backlog, likely due to the bug not impacting a lot of users.

    We would recommend users here still experiencing this issue to file their own indiviudal bugs and then post in this thread as more reports from users (a higher user pain) will hopefully escalate the issue quicker for resolution.

    You can find more details on the bug report process here: https://unity3d.com/unity/qa/bug-reporting
     
    parkjoonyoun_unity702 likes this.