- Home /
Question by
to5toi · Dec 22, 2013 at 04:01 PM ·
loading filescript loadingstatic script
Can you help me with my loading screen
So as the title says i need some help with my loading screen i have a script but it dosent work.`static var inputTextActive = false; private var TimerMax = 300; var Timer = TimerMax;
static var LoadingScreenOn = true;
//Texture
var texture : Texture2D;
var texture1 : Texture2D;
var texture2 : Texture2D;
function Start ()
{
if (Loading_Screen.LoadingScreenOn == true)
{
Loading_Screen.LoadingScreenOn = false;
guiTexture.enabled = false;
}
}
function Update ()
{
if (Loading_Screen.LoadingScreenOn == true)
{
RandomPic();
guiTexture.enabled = true;
}
}
function RandomPic()
{
var randPic = Random.Range(0, 2);
var chosenPicture = randPic;
switch (chosenPicture)
{
case 0:
guiTexture.texture = texture;
break;
case 1:
guiTexture.texture = texture1;
break;
case 2:
guiTexture.texture = texture2;
break;
}`
Comment