it just doesn’t make sense to me: i changed “true” to “false” to set things inactive, which works (setting them inactive i mean), but the making them appear code doesn’t do anything. and deathToll is increasing, also, these objects aren’t in hierarchies where children are being set inactive or anything like that, so that’s not the problem. here’s my code for both the appearing and not appearing:
public class DeathSet_Inactive : MonoBehaviour {
public int Num = 3;
// Use this for initialization
void Start () {
int dtoll = GameObject.Find(“DeathToll”).GetComponent().deathToll;
if (dtoll>=Num){
this.gameObject.SetActive(false);
}
}
public class DeathSetActive : MonoBehaviour {
public int Num = 3;
// Use this for initialization
void Start () {
int dtoll = GameObject.Find(“DeathToll”).GetComponent().deathToll;
if (dtoll>=Num){
this.gameObject.SetActive(true);
}
}
because the code is practically the same, i’m wondering if there’s something about how unity handles objects that are inactive before the scene loads that i don’t know about.