How to change this script from time to check if everything is rendered?

I have this script which I juts made basic. I have to problems:

  1. I want to change the string to something else, so it still works the same way as a string, but I can just drag a scene to the spot in the inspector.

  2. I want to change it from time, to check if all the items in the scene have been rendered before it let’s you go to that scene. Like real splash screens do.
    Here’s the script:
    using UnityEngine;
    using System.Collections;

    public class SplashScreens : MonoBehaviour {
    public float timer = 2f;
    public string toLevel;

     // Use this for initialization
     void Start () {
     	StartCoroutine("DisplayScene");
     }
     
     IEnumerator DisplayScene() {
     	yield return new WaitForSeconds( timer );
     	Application.LoadLevel( toLevel );
     }
    

    }

This is confusing but I think I understand you. Splash screens are before the engine fully loads - are you referring to that - or to LOADING screens for displaying something between levels/scenes?

If ‘splash screen’ (before engine fully loads): After all Awake()s are called, the game loops should start (i.e., Update()s) are called… You check one of your script’s Update() functions for it’s first execution (as a hack way, don’t know any other atm). Thought I don’t know if you can make your own custom splash screen while the engine is loading up unless it’s available in unity another way.

If the later way (Loading screen), you can do something similar - like create an empty game object, and wait for its update function - then after the first update pass set that game objects enabled field to false and return the value to the script that is waiting for game load to complete.

As for your dragging a scene into the object field - I don’t think you can, and it’s not like it’s a lot of extra work. It’s more work for people to read your question than type in a few string names anyway.