Search Unity

AssetBundle does not contains the referenced scenes

Discussion in 'Asset Bundles' started by MHM90, Apr 7, 2018.

  1. MHM90

    MHM90

    Joined:
    Oct 21, 2017
    Posts:
    5
    Hi,

    I have created a simple
    ScriptableObject
    which contains some info data and references to some objects including some Scenes (as
    UnityEngine.Object
    ) which all must be contained in an asset bundle to be used in our game as an extra level.
    According to docs, by building asset bundle using an asset created by this
    ScriptableObject
    all the referenced
    UnityEngine.Object
    s (including scenes) must be contained in the built asset bundle. But the bundle does not contain scenes and only contains asset file of my
    ScriptableObject
    . How is it possible?

    Here is my
    ScriptableObject
    :

    Code (CSharp):
    1.  
    2.  public class GameDataAsset : ScriptableObject {
    3.         public string title;
    4.         public string mainScenePath;
    5.         public UnityEngine.Object[] scenes; // <- here we reference to scenes
    6.         // ...
    7.  
     
  2. ammar_12435

    ammar_12435

    Joined:
    Jun 28, 2018
    Posts:
    24
    If you are trying to add scenes and other assets to the same bundle then that is not possible as of now.
    Its a limitation.
    Source: