I have a simple script attached to 3d texts, which display some game over text, the operation is simple, i wish to hide whilst the game is running then show when its at game over.Whilst the game runs none of the items i have this script attached to shows however when it actually is game over only one item shows, ive checked that the script is attahced to the given object and still no luck, it will only ever work for one single item, why is this
using UnityEngine;
using System.Collections;
public class GameOver : MonoBehaviour {
public GameObject text;
Vector3 myOldSize;
// Use this for initialization
void Start () {
text=this.gameObject;
Debug.Log(text.name);
Hide ();
}
// Update is called once per frame
void Update () {
}
public void show()
{
Debug.Log ("called");
this.renderer.enabled=true;
this.collider.enabled=true;
}
void Hide(){
this.renderer.enabled=false;
this.collider.enabled=false;
}
/*
void OnCollisionStay(Collision Other){
if(Other.gameObject.name==("Cursor_prefab")){
}*/
}
which one shows and what code calls show? it's usually best to first assume that Unity's code works
– LoiusThe list of guitextures are Exit, Game Over, High Score and Main menu. In that precise order, the one that shows is the Exit @Louis
– skyerz