- Home /
 
loading progress scene slows down game framerate
Hello! I've created an empty scene to show the loading progress of my game. It contains only a gui Texture that changes basing the async.progress percentage. All works correctly but when the real game begins now it has very low fps (maybe 3-4 fps). Before i added this "loading scene" everything run smoothly. This is the code, am i forgetting something? Do i need to unload the loading scene somehow?
 var async: AsyncOperation;
 var progress : float;
 var loading : Texture[];
 var x : int;
 
 function Start () {
     async = Application.LoadLevelAsync("MyGame");
 }
 
 function Update() {
     progress = async.progress;
     if (progress < 0.2) {
         x = 0;
     }
     if (progress > 0.2) {
         x = 1;
     }
     if (progress > 0.4) {
         x = 2;
     }
     if (progress > 0.6) {
         x = 3;
     }
     if (progress > 0.8) {
         x = 4;
     }
     if (progress > 0.9) {
         x = 5;
     }
 }
 
 function OnGUI() {
     GUI.DrawTexture(Rect(100,100,100,100), loading[x]);
 }
 
 
              what do i have to start as a coroutine? the async loading process? or the changing texture?
Answer by Mz3D · Nov 16, 2012 at 01:56 PM
I've found out that was an audio problem, nothing to do with the async loading! sorry!
Your answer
 
             Follow this Question
Related Questions
How does one Implement a Loading screen? 2 Answers
Why is my title screen not displaying all the text and not allowing the player to start the game? 1 Answer
Scene starts before scene loading is finished 0 Answers
Turning the game into an FPS 1 Answer
Instantiate many Prefabs / Async Loading 3 Answers