Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Wiyanto · Sep 30, 2015 at 07:10 PM · c#scripting problemerror messageloading screen

ERROR Loading Script! WHAT'S WRONG??

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

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];
     }
 }
 

unityerror.png (122.3 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Jessespike · Sep 30, 2015 at 08:31 PM

Seems like it's trying to load a scene that doesn't exist. Do you have a scene called "MainScene" in your project?

Comment
Add comment · Show 1 · Share
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
avatar image Wiyanto · Oct 01, 2015 at 03:11 AM 0
Share

Yes of course. i have scene "$$anonymous$$ainScene". but still have an error

avatar image
0

Answer by KristianBalaj · Sep 30, 2015 at 08:28 PM

I think problem can be in that, that you do not have unity pro version because I think than async functions are enabled only in pro version of unity.

Comment
Add comment · Show 5 · Share
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
avatar image Wiyanto · Oct 01, 2015 at 03:12 AM 0
Share

that's different Unity Free and pro for script feature??

I'm Using Unity 5 Free Version (T.T)

avatar image KristianBalaj · Oct 01, 2015 at 06:30 PM 0
Share

Yes of course .... i think that in free version you can not use async operations ... for scene loading try to use fading out and in or just load one Sprite "Loading" and Load scene. You can´t use moving loading scenes.

avatar image outasync · Oct 01, 2015 at 09:29 PM 1
Share

Version 5 and above contain all engine features including load scene async in the free and pro version

avatar image KristianBalaj outasync · Oct 02, 2015 at 05:37 PM 0
Share

I don´t think so.

avatar image outasync KristianBalaj · Oct 02, 2015 at 05:46 PM 0
Share

It does, I have it, use it, and it works just fine.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

"The associated script cannot be loaded." 0 Answers

Unity Crashes When Clicking Play: Script Error? 1 Answer

Script errors 1 Answer

Object reference not set to an instance of an object - Jumping Scripts (C#) 1 Answer

Create a copy of a non MonoBehaviour class and set variables from other class 0 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