Search Unity

Loading Screen Manager - Free Script

Discussion in 'Scripting' started by Democide, Jan 23, 2016.

  1. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    I've built a LoadingScreenManager that allows you to quickly add a loading screen to your game. All you need to supply are the visuals in the form of a scene. You can find the script on the Nowhere Prophet blog here:

    http://blog.nowhereprophet.com/post/137897123478/loading-screen-unity-script

    nowhereProphetScreenLoad.png

    If you enjoy it, please let me know or leave a like/repost on the blog. I'm trying to gauge interest to see if it's worth it spending more time to release some of our game scripts as resources for other devs. Takes a bit of time cleaning them up and putting them out there.

    Anyway, hope you like it!
     
  2. MagicZelda

    MagicZelda

    Joined:
    May 1, 2013
    Posts:
    90
    read the blog seems good, but when clicked on the link for your script, my Anti virus blocked it as bad site :( Just thought i would let you know
     
  3. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    That's weird. It's a pretty big code share site...
     
  4. DarkJoney

    DarkJoney

    Joined:
    Jan 31, 2013
    Posts:
    24
    Hey Martin, could you show how to setup it correctly?
     
  5. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    What is unclear, DarkJoney?
     
  6. DarkJoney

    DarkJoney

    Joined:
    Jan 31, 2013
    Posts:
    24
    I have issues with calling loading function via script. I receved errors connected with GetComponent.
    I fixed it, but It loads ONLY 3rd level of my game with any configuration, and loading process doesn't popup.
    I want to call loading process via UI button in my menu. I have 44 levels in my game.
    Do you have any ideas?
    Thanks.
     
  7. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    Well, I guess you make a regular public function with an int parameter which is the build index, which points to the static function. then you point your buttons there and use the int parameter to determine which level is loaded and you do that in the button. UI buttons allow you to determine the parameter with which a function is called.
     
  8. Collin__Patrick

    Collin__Patrick

    Joined:
    May 20, 2015
    Posts:
    188
    I am getting an error on the line that says:
    using UnityEngine.SceneManagement;

    The error says that SceneManagement does not exist.
     
  9. Collin__Patrick

    Collin__Patrick

    Joined:
    May 20, 2015
    Posts:
    188
    Has anyone else had this problem?
     
  10. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    I'm guessing you're not on Unity 5.3 then? I'm not sure at what version exactly, but sometime in 5 they introduced SceneManagement. It's a different method for loading scenes in older versions but easy to replace.
     
  11. Collin__Patrick

    Collin__Patrick

    Joined:
    May 20, 2015
    Posts:
    188
    Oh wow I am 2 versions behind! I am still on 5.1, thanks for the help.
     
  12. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    315
    Hey guys, I've recorded a short video explaining the script some more. Check it out here:

     
    Wolfkingdom and PlayCoins like this.