Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Editor only objects cannot be included in AssetBundles: LightingData.asset

Discussion in 'Asset Bundles' started by Peter77, Jun 28, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    For one scene in our game we get the following warning while building asset bundles with Unity 2018.4.2f1:
    "LightingData.asset" is an asset generated by Unity via the "Generate Lighting" step.

    I'm totally lost why this warning is generated, any help would be appreciated. I already deleted all lighting data and rebaked, but this didn't fix the problem.
     
    Last edited: Jul 1, 2019
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    I found the issue and it's actually a pretty obvious one to be honest.

    upload_2019-7-1_8-26-40.png

    I've these scenes:
    • assets/content/world_01/scenes/game_world_01.unity
    • assets/content/world_01/scenes/game_world_01_art.unity
    • assets/content/world_01/scenes/game_world_01_logic.unity
    Lighting data is stored in the folder:
    • assets/content/world_01/scenes/game_world_01/
    The problem was that I've tagged some parent folders to be stored as an asset bundle, to catch its content, in case a sub-folder (such as "art" or "audio") wasn't marked to be put in a bundle:
    • assets/content/
    • assets/content/world_01/
    The "LightingData.asset" then is pulled in, because its parent directory "world_01" and "content" is stored to a bundle.

    Is there a way to exclude a sub-folder from the asset bundle pipeline, if a parent folder is marked to be stored into a bundle?