I want to make a level menu that connects all my scenes.
Here is my code (it is in JAVASCRIPT):
function OnMouseUp(){
if(GameObject.FindWithTag("A")){
Application.LoadLevel("Letter A");
}
else if(GameObject.FindWithTag("B")){
Application.LoadLevel("Letter B");
}
else if(GameObject.FindWithTag("C")){
Application.LoadLevel("Letter C");
}
}
so, the problems is when I click A and B it is fine but when I click the scenes from a will appear. I also tried to use the index but it is much worse. when I used the index, when i click A and B scene from letter C will load. What seems to be the problem?