- Home /
Scene transfer splash screen not working
Hey there!
So, I've been using the following function sucessfully to show a Texture before unloading a scene in Unity (and loading a new one).
var image : Texture;
function showScreen() {
GUI.DrawTexture(Rect(0,0,Screen.width, Screen.height), image);
}
I've been using this on the context of a menu (since the map wasn't designed back then), and it has always worked perfectly, showing up and "freezing" before the scene unloaded, and then the new scene would appear. However, after creating the map, I implemented this function to be used after the player pressed a button:
function goWarp(destiny : String) {
//map off
swapStatus();
//play anymation (future)
//load new scene
//show splash screen
var go : GameObject = GameObject.FindGameObjectWithTag("LoadScene");
var scr : LoadScene = go.GetComponent(LoadScene);
scr.showScreen();
//save game first
var save_obj : GameObject = GameObject.FindGameObjectWithTag("SaveGame");
var save_scr : SaveGame = save_obj.GetComponent(SaveGame);
save_scr.Save();
//load level
scr.LoadScene(destiny);
}
However, in this situation, the image doesn't even appear, and the scene freeze before showing the new scene.
So, is there anything that might be affecting it?
Thanks in advance
Your answer
Follow this Question
Related Questions
How to have the scene load after a few seconds 1 Answer
How do I detect if a scene is being loaded during edit time? 5 Answers
LoadLevelAdditive destroy some textures 0 Answers
Scene loading time issue 2 Answers
Update Custom Editor on Load 0 Answers