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 /
avatar image
0
Question by alone1992 · May 17, 2015 at 03:17 PM · javascriptloadprogress bar

Unity 5.0 Progress bar for scene loading JS

Hello

I need simple example unity script code for unity 5 progress bar for scene loading. I see this links and couldn't find the answer and also watch some old tutorials but couldn't understand any thing :(

http://answers.unity3d.com/questions/457594/how-to-make-a-progress-bar-for-loading-next-scene.html

thanks in advance

Comment
Add comment · Show 3
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 alone1992 · May 18, 2015 at 01:20 PM 0
Share

any tutorial or link

avatar image hoekkii · May 18, 2015 at 02:56 PM 1
Share

I guess you'll need Unity pro for this feature (Application.LoadLevelAdditiveAsync)

http://docs.unity3d.com/ScriptReference/Application.LoadLevelAdditiveAsync.html

and to get the progress value (see preview in link): async.progress

avatar image KdRWaylander · May 19, 2015 at 11:43 AM 1
Share

...

No need of Unity pro. Since Unity5 all game engine features are all included !

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by KdRWaylander · May 19, 2015 at 02:37 PM

Hi,

As @hoekkii said, you can have the progress of LoadLevelAsync with http://docs.unity3d.com/ScriptReference/AsyncOperation-progress.html

So now we have a float between 0 and 1.0f or 0 and 100.0f i guess and that's a good start !


Now there are like thousands of techniques for a loading bar ! Based on the progress float you can, fill an image, instantiate little cubes, plays different noises, turn up the volume ...

Let's focus on the classical one, the bar that fills up.

In a canvas add an image. Its type should be simple right now, change it to filled and adjust the parameters:

  • Fill method: Horizontal

  • Fill origin: Left

  • Fill amount: 0

Now with a script attached to the image, in the Update() function, make the fill amount equal to the progress float (make sure that this float is between 0 and 1)


Here you go :)

Cheers

Comment
Add comment · Show 3 · 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 alone1992 · May 21, 2015 at 09:06 AM 0
Share

thanks @$$anonymous$$dRWaylander , I don't know why @hoekkii don't sent his answer on answers part -_-

avatar image hoekkii · May 21, 2015 at 09:15 AM 1
Share

Because someone else could explain it better than me, I only knew script reference

avatar image alone1992 · May 22, 2015 at 06:54 AM 0
Share

@hoekkii thanks I'll merge your answers and test with debug,log or print :)

avatar image
0

Answer by Aily · Nov 11, 2016 at 12:23 PM

 IEnumerator Start ()
 {
     var op = UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(sceneName);

     while (!op.isDone)
     {
         print(op.progress);
         yield return null;
     }
 }
Comment
Add comment · 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

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

21 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

Related Questions

Load GameObject 3D model from server 1 Answer

Saving an Object of a Class 1 Answer

Best way to make an animated infinite striped progress bar? 1 Answer

No Resources.Load() avaliable 1 Answer

random level loader? 1 Answer


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