- Home /
Question by
conan1987 · Jan 06, 2019 at 09:25 AM ·
assetbundledownloadable contentupdates
How to download assetbundles and use it locally in unity 3d 2018?
I want to download asset bundles (Windows and android )by checking the version first and if there is a new version the game download it automatically and uses it locally after this ? all i have done until now is to download the asset bundle only , here is my code : using UnityEngine; using UnityEngine.Networking; using UnityEngine.SceneManagement;
public class loader : MonoBehaviour
{
private AssetBundleCreateRequest bundleRequest;
private UnityWebRequest request;
private void Start()
{
request = UnityWebRequestAssetBundle.GetAssetBundle("http://localhost/focus/level2",1);
request.SendWebRequest();
}
private void Update()
{
if (request.isDone)
{
AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(request);
SceneManager.LoadScene("SampleScene");
}
else
{
Debug.Log("not");
}
}
}
Comment
Your answer
Follow this Question
Related Questions
How Export and Downloading Asset Bundle at runtime? 0 Answers
Using Occlusion Culling with remotely downloaded Asset Package 0 Answers
Asset bundle downloads lagging after upgrading project from Unity 2018.X to Unity 2019.X 0 Answers
download asset bundle when app is not active 0 Answers
How do I have multiple UnityWebRequests in one coroutine? 1 Answer