Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

ERROR Loading Script! WHAT'S WRONG??

$
0
0
Hello All,, i'm a newbie in C# script i have a problem here, i have download loading scripts it's works fine in original *.unitypackage File!, but it's always have an error, if the script i using it in my project. What's the problem??! i have checked the script manually and 'its same. No different at all. Can anybody help me? Thanks in advance (^-^)![alt text][1] here my scripts : using UnityEngine; using System.Collections; public class LoadingAWScript : MonoBehaviour { public GUITexture LoadingTexture; public Texture[] LoadingTextures; private AsyncOperation loadscene; private float StreamProgress = 0.0f; // Use this for initialization void Start () { LoadingTexture.texture = LoadingTextures[0]; loadscene = Application.LoadLevelAsync("MainScene"); } // Update is called once per frame void Update () { StreamProgress = loadscene.progress; if ( StreamProgress <= 0.0f) LoadingTexture.texture = LoadingTextures[0]; if ( StreamProgress > 0.0f && StreamProgress <= 0.1f) LoadingTexture.texture = LoadingTextures[1]; if ( StreamProgress > 0.1f && StreamProgress <= 0.2f) LoadingTexture.texture = LoadingTextures[2]; if ( StreamProgress > 0.2f && StreamProgress <= 0.3f) LoadingTexture.texture = LoadingTextures[3]; if ( StreamProgress > 0.3f && StreamProgress <= 0.4f) LoadingTexture.texture = LoadingTextures[4]; if ( StreamProgress > 0.4f && StreamProgress <= 0.5f) LoadingTexture.texture = LoadingTextures[5]; if ( StreamProgress > 0.5f && StreamProgress <= 0.6f) LoadingTexture.texture = LoadingTextures[6]; if ( StreamProgress > 0.6f && StreamProgress <= 0.7f) LoadingTexture.texture = LoadingTextures[7]; if ( StreamProgress > 0.7f && StreamProgress <= 0.8f) LoadingTexture.texture = LoadingTextures[8]; if ( StreamProgress > 0.8f && StreamProgress <= 0.9f) LoadingTexture.texture = LoadingTextures[9]; if ( StreamProgress > 0.9f && StreamProgress <= 1.0f) LoadingTexture.texture = LoadingTextures[10]; } } [1]: /storage/temp/55280-unityerror.png

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>