// Update is called once per frame
void Update()
{
if(primary.Equals("mines")){
//primaryAmount.GetComponent<Text>().text = ""+mines;
primaryAmount = mines;
Debug.Log("MinesWorking");
//PrimaryAmountText.amount = mines;
}
else{
}
if(secondary.Trim().Equals("beacons")){
secondaryAmount = beacons;
Debug.Log("working");
}
else{
}
if(ability.Equals("teleport")){
/// abilityAmount.text = ""+teleport;
}
else{
}
}
}
Hello guys. I have problems with my code above. mu update function is only properly working on the first if statement about mines. the 2nd if statement about beacons only works 2/10 times when i run the game. Any suggestions. It is only supposed to check if the string is equal to “beacon”, but it doesnt seem to work all the time