Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed May 31, 2016 at 08:55 AM by Prasanna for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Prasanna · Jan 10, 2015 at 11:19 AM · sceneassetbundlescene-loadingdownloadloadfromcacheordownload

Not download/load from cache for second time

Hi all, Here i created a assetbundle for scene by scene. I its perfectly loaded the scene first time but it doesn't load or even download the assetbundle,

 using UnityEngine;
 using System.Collections;
 
 public class Orbitrek_Elite : MonoBehaviour 
 {
     private string progress = " "; 
     private string logtxt;
     private string url = ;
     
     GUIStyle Font_Size;
 
     void Awake()
     {
         Font_Size = new GUIStyle ();
         Font_Size.fontSize = 40;
         Font_Size.normal.textColor = Color.black;
     }
 
     void log( string t )
     {
         
         logtxt += t + "/n";
     }
     void OnGUI()
     {
         Vector3 scale;
         
         float ResolutionX   = 1024;
         float ResolutionY   = 768;
         
         scale.x             = (float)Screen.width/ResolutionX;
         scale.y             = (float)Screen.height/ResolutionY;
         scale.z             = 1;
         
         Matrix4x4 svMat     = GUI.matrix;
         GUI.matrix          = Matrix4x4.TRS(new Vector3(0,0,0),Quaternion.identity,scale);
         
         GUI.Label (new Rect (560, 684, Screen.width - 5, Screen.height - 5), "Downloading: ", Font_Size);
         GUI.Label (new Rect(795, 684, Screen.width - 5, Screen.height - 5), logtxt + " " + progress, Font_Size);
     }
     
     IEnumerator Start()
     {
         using(WWW www = WWW.LoadFromCacheOrDownload (url, 1))
         { 
             while( !www.isDone )
             {
                 progress = " " + (www.progress * 100.0f).ToString("#") + " %";
                 yield return null;
             }
             yield return www;
             AssetBundle bundle = www.assetBundle;
             bundle.LoadAll();
             Application.LoadLevel("Orbit");
         }
     }
 }

In this script i try to load the scene, but its working smoothly when i load all scene in one time.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

25 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to load a scene from an asset bundle in unity 5? 1 Answer

Asset Bundle starts loaded 0 Answers

Asset bundle not load the object, but it download 0 Answers

Using as AssetBundle to replace first scene 2 Answers

Can someone explain this exception? ArgumentException: SceneManager.SetActiveScene failed; invalid scene 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges