I need to disable images on the startup of a scene. I have image variables that are referenced through the editor. These variables will not enable or disable and I do not know why. Here is the code:
public int sceneToLoad = 0;
public Image ocean;
public Image cell;
void awake()
{
ocean.enabled = false;
cell.enabled = false;
}
public void StartLevel()
{ Application.LoadLevel (sceneToLoad); }
public void rightArrow()
{ sceneToLoad++; }
public void leftArrow()
{ sceneToLoad--; }
void update()
{
if (sceneToLoad == 0)
cell.enabled = true;
else if (sceneToLoad == 1)
ocean.enabled = true;
}
}