Hi,
I have loaded an assetbundle in a scene and called DontDestroyOnLoad() on it, how can i access it from the new scene ?
Did you call DontDestroyOnLoad() directly on the asset bundle, or on the assets you loaded from the bundle? Assuming you did the latter, the assets should remain in your project across scene loads and be accessible the same way everywhere.
i called it on the entire bundle.
also, i don’t instantiate the bundle, i just load assets from it.
So the bundle isn’t anywhere in my hierarchy but only in my script where I loaded it. Should i instantiate it ?
If you load an asset from the bundle, you’ll need to call DontDestroyOnLoad() on that asset if you want it to be available across scenes.
If you just want to keep the asset bundle around and re-load the assets from it each time you swap scenes, you’ll need to store a reference to the bundle somewhere that persists across scene loads.
Thanks Laurie, indeed when i reference it across my scene it’s working.