Как-то так:
public class LevelLoaderScreen : MonoBehaviour
{
public string levelName;
public Texture2D loadingScreenTexture;
private AsyncOperation _loadingProgress;
public void Start()
{
DontDestroyOnLoad(gameObject);
DontDestroyOnLoad(loadingScreenTexture);
_loadingProgress = Application.LoadLevelAsync(levelName);
}
public void OnGUI()
{
var screenRect = new Rect(0, 0, Screen.width, Screen.height);
GUI.DrawTexture(screenRect, loadingScreenTexture);
if(!_loadingProgress.isDone)
{
var labelStyle = new GUIStyle(GUI.skin.label);
labelStyle.alignment = TextAnchor.MiddleCenter;
GUI.Label(screenRect, "Lading: "+(_loadingProgress.progress * 100).ToString("000"));
}
else
{
var buttonRect = new Rect(Screen.width/2 - 80, Screen.height/2 - 30, 160, 60);
if(GUI.Button(buttonRect,"Press to continue"))
{
Destroy(loadingScreenTexture);
Destroy(gameObject);
}
}
}
}