Duplicate Question: http://answers.unity3d.com/questions/50804/how-to-change-time-splash-screen-is-displayed.html
Add Custom Splash Screen
Hello, I am wondering how to add a custom splash screen on my PC Game! Please if anyone can help I would gladly appreciate it. I need it to be at least 5 seconds of my studios then switch to my main menu. I have a script but it just shows the logo for under a second and then switches.
How would I make it wait for 5 seconds?
using UnityEngine;
using System.Collections;
public class SplashScreen : MonoBehaviour {
public string loadLevelName; // Name of the level to load after the splash screen appears
private bool isLoading = false;
public static SplashScreen me;
void Awake() {
me = this;
}
void Start () {
// Adjust the width of the image to fill the screen while maintaining the image aspect ratio
GUITexture image = gameObject.GetComponent<GUITexture>();
float imageRatio = (float) image.texture.width / (float) image.texture.height;
float screenRatio = (float) Screen.width / (float) Screen.height;
Vector3 scale = Vector3.one;
if (Screen.width >= Screen.height) scale.x *= imageRatio / screenRatio;
else scale.y *= screenRatio / imageRatio;
transform.localScale = scale;
}
void Update() {
// Start loading the level on the next frame
if (!isLoading) {
Application.LoadLevelAdditive(me.loadLevelName);
isLoading = true;
}
}
// Call from the loaded level to hide the splash
public static void Hide() {
if (me != null) me.gameObject.SetActive(false);
}
}
Answer by MadDevil · Oct 16, 2015 at 07:17 AM
you can manually set splash screen in pro edition by going to plater settings. there you will find options for splash screen
http://docs.unity3d.com/Manual/AndroidMobileCustomizeSplashScreen.html
@$$anonymous$$adDevil
As I said for a PC GA$$anonymous$$E, Please read the question before you answer.