hi i have a script for scene loading in background while show a full screen image with a waiting video.
but the problem is if the image is stretched it covers the loading video too, i want to show the loading video on the above of the image. can anyone help me out!! here is my code (c#), i just put a part of the code where the movie texture and 2d texture function with fade. if you need full code please leave a comment.
void OnGUI()
{
PlayVid.loop = true;
PlayVid.Play();
GUI.DrawTexture(new Rect (Screen.width - 260,Screen.height - 110,260,110), PlayVid);
GUI.depth = guiDepth;
if (splashLogo != null)
{
GUI.color = new Color(GUI.color.r, GUI.color.g, GUI.color.b, Mathf.Clamp01(alpha));
GUI.DrawTexture(splashLogoPos, splashLogo);
if (alpha > 1.0f)
{
status = FadeStatus.FadeWaiting;
timeFadingInFinished = Time.time;
alpha = 1.0f;
if (splashType == SplashType.LoadNextLevelThenFadeOut)
{
oldCam.depth = -1000;
loadingNextLevel = true;
if ((Application.levelCount >= 1) && (levelToLoad != ""))
{
Application.LoadLevel(levelToLoad);
}
}
}
if (alpha < 0.0f)
{
if (splashType == SplashType.FadeOutThenLoadNextLevel)
{
if ((Application.levelCount >= 1) && (levelToLoad != ""))
{
Application.LoadLevel(levelToLoad);
}
}
else
{
Destroy(oldCamGO); // somehow this doesn't work
Destroy(this);
}
}
}
}