Search Unity

Is there a way to make

Discussion in 'Asset Bundles' started by GR00V3R_73, Jun 30, 2020.

  1. GR00V3R_73

    GR00V3R_73

    Joined:
    Feb 13, 2014
    Posts:
    4
    Hi. I'm evaluating Asset Bundles and I've gone through every document I can find, but can't get it working and I feel like I'm missing something key: the step from loading the asset bundle to actually using its prefab assets in the scene. :)

    I have successfully created and loaded an Asset Bundle that consists of a set of prefabs. However, now that I have the bundle loaded, I don't seem to be able to use the prefabs with scripts outside of the script that loads the assets.

    I'm worried that I'm proceeding on a false assumption: that loading all assets (e.g.

    Code (CSharp):
    1. void LoadAllAssetsFromBundle()
    2.     {
    3.         myLoadedAssetBundle.LoadAllAssets();
    4.     }
    —should make all assets available to all scripts in the scene.

    Is this possible? To make a bundle's prefab assets available to the other scripts that previously used those prefabs? Or do you have to load each prefab asset in each script that wants to instantiate it?

    Any advice gratefully accepted. Thanks in advance for your help. :)