how to make splash screen/loading screen in unity

Unity tutorial - how to make a loading screen in unity, halo guys this first article at this blog.
i hope you have new experience after read this article.
in unity we can't change first splash screen "powered by unity" beacause we use free version without proffesional license.
but we can resolve it with create new screen and save it with name "splashscreen", after we have new scene let see step by step how it can work.

how to make a splashscreen in unity step by step


step 1 :
choose your image 500x500 with colour dominant background like white,black,or power full colour, but choose one and don't use rainbow colour. why ? you can see and understanding after read full this article.
drag your image to your project. or you can import it in unity3d.


step 2 :
after you succes import your image or drag your image, now setting colour camera with same background colour on your image. ( im use white colour background, so i use same colour on my camera )


step 3 :
now drag your image into scene, and resize as you want.
see, the image is merge with maincamera.
wait... how to drag image and resize it ?
  • How to drag image into scene in unity
    Click image, hold, and drag it to scene 
  • How to resize asset in unity Click asset or gameobject you want to resize, and press "R" on keyboard, now you can resize it.


step 4 : 
now create C# code with click right on project window >  Create > C#. and give name "splashscreen"


step 5 
now write the script codes.
if you want learn harder, dont copy paste this code, but learn it :

using UnityEngine;
using System.Collections;

public class splashscreen : MonoBehaviour {
    public string nextscene;

    void Start () {
        StartCoroutine ("startsplash");  //to execute the IEnumeratir startsplash  
}
    void Update () {
  
    }

    IEnumerator startsplash (){    
        yield return new WaitForSeconds (2);    //excute after 2 seconds
        Application.LoadLevel (nextscene);   //change to next scene, edit it on gameobject
        StopCoroutine ("startsplash");  //to stop excute after task complete
}
}



save after you complete wrote this code, if you get error, lets ask on comment

step 6 :
after complete and not get any error, you can drag you code to main camera


step 7 :
make animation to make amazing splashscreen, with click  window > animation.


step 8 :
after you succes to show animation window, you will see a new window on your project.
click your image splashscreen > click record button ( red colour on animation window ) > and lets show your creativity to make the splashscreen have art.
i make it transparant in first time.


step 9 :
and make it visible on 1.00. and transparant again in 1.30. and try transparant again in 2.30.
why i do it ? change transparant in 1.30 and 2.30 ? beacause we setting in c# after 2seconds the scene will load to new scene. so i do it for 2 times. it will look smooth



step 10 :
now add your screen in buildsetting, click file > buildsetting. and add current


step 11 :
in main camera we have code that had been in step 6. fill next screen with any scene you have, or i will give example. i fill "menu" so i must have scene name "menu" and already add in build setting


step 12 :
to make a new scene click file > new scene. and save it with name "menu" 


step 13 :
and add to build setting again.
in unity, if we have scene, we must add it on build setting, beacause if we not add it, unity would not load it.


step 14 :
now back to splashscreen scene. and click play.


step 15 :
if you do this tutorial correctly you will see the scene will change after 2 seconds.


this end of tutorial about how to change splash screen in unity.
i have point to explain it :

you can use any image, but you must make your image suitable with your game, for example. 
this tutorial use potrait mode, so you must make image screen in 800x1200 potrait mode.

if you have problem. let me know it.
i will upload the video tutorial later, so stay stunned on this blog.

Share this

Related Posts

Latest
First