I’m very new to unity and I got stuck in storing Asset and also I’m not a native English man so sorry for my English also.
I’m using asset bundle manager of unity and I can load assets from the server when I need them but I don’t want to load the assets every time, I wanted to store the asset bundle or the asset in my project so that I can use it later.
currently, I’m using this code for loading a scene from my AssetBundle Server.
using UnityEngine;
using System.Collections;
using AssetBundles;
using System;
public string sceneAssetBundle;
public string sceneName;
IEnumerator Start()
{
yield return StartCoroutine(Initialize());
}
IEnumerator Initialize()
{
DontDestroyOnLoad(gameObject);
AssetBundleManager.SetSourceAssetBundleURL("URL");
AssetBundleManager.SetDevelopmentAssetBundleServer();
var request = AssetBundleManager.Initialize();
if (request != null)
yield return StartCoroutine(request);
AssetBundleLoadOperation request = AssetBundleManager.LoadLevelAsync(sceneAssetBundle, sceneName, true);
if (request == null)
yield break;
yield return StartCoroutine(request);
}
P.S. I’ve also taken help from this :
but some of it APIs are deprecated.