Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Making a loading screen - FUN FACT/TIP VERSION

A Tutorial for Baldi's Basics

No ads for members. Membership is 100% free. Sign up!
As a person who's made this I can show you how, this is how I do it.
1. Canvas

1. Make a canvas called loading screen

2. Make sure you have a:
Image,
Text that should overlap with the image
Raw Image that is the whole size of the canvas, this is your "screen background
Make sure these are all seperate GameObjects that are a child of the Canvas.

Put the scale on the image currently to 
X:0 Y: Depends Z:0 and also make sure the Text area is as long as how long you want the image to be. 

3. Import # amount of textures, this will be the textures for your screen background. Remeber the number you have LATER

2. Coding

1. Make a new Script called something like LoadingScreenScript and put it on the Canvas as a component

2. Make these variables (Make sure you're using UnityEngine.UI and UnityEngine.SceneManagment)
public RawImage screenBackground;
public Texture[] screenTextures = Texture[number of textures you've imported];
public Image textArea;
public Text tipText;
public string[] tipTexts = new string[(number of textures you have])
{
       (Put all the string for yoyr tips here, make sure you seperate them with COMMAS)
};

3. Make a void called LoadLevel(int sceneIndex)
-and also make an IEnumerator called LoadToLevel(int sceneIndex)

4. In the LoadLevel void put
"StartCoroutine(this.LoadToLevel(sceneIndex));
5. In the LoadToLevel IEnunerator put

this.tipText.gameObject.SetActive(false);
int index = UnityEngine.Random.Range(0f, [number of texts you have - 1]);
this.tipText.text = tipTexts[index];
this.screenBackground.texture = this.screenTextures[index];
while (this.textArea.transform.localScale.x < [your amount])
{
     float increaseFactor = 20f;
     this.textArea.localScale += new Vector3(increaseFactor * Time.deltaTime, 0f, 0f);
     yield return null;
}
this.textArea.gameObject.SetActive(true);
SceneManager.LoadSceneAsync(sceneIndex);
Pheww.

6. Now save it and put all the references in the editor

7. Go to the StartButtonScript and make a new variable:
public LoadingScreenScript lss;

Now replace the SceneManager.LoadScene("School"); with
this.lss.LoadLevel(2);
(2 is the buildIndex of the School scene btw)
And your done!
Sign up to access this!

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Key Authors
RealT5mpler
RealT5mpler Joined 11mo ago
Offline
602 points Ranked 44376th
16 medals 4 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • Submitted 15 Tutorials Medal icon
  • 50 posts awarded Exemplary Feedback Medal icon
  • One month a member Medal icon
  • Returned 100 times Medal icon
Creator of tutorial

Submitter

RealT5mpler avatar
RealT5mpler Joined 11mo ago
Not on right ok
602 points Ranked 44376th
16 medals 4 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • Submitted 15 Tutorials Medal icon
  • 50 posts awarded Exemplary Feedback Medal icon
  • One month a member Medal icon
  • Returned 100 times Medal icon
RealT5mpler
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Intermediate

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 0
  • 701
  • 10
  • 2mo

More from Submitter

WiPs by Submitter

More Decompile Tutorials