is there a way to tell if an int has changed? or a string for that matter?
basically I am using textfields to change variables but when those variables get changed I need to know so that I can change another variable to a different number
how do I tell if a variable has changed or if a textfield has been edited?
I would do as DaveA suggests, though I would put the check into OnGUI where you edit the value, rather than in Update. Something like (C#, untested) ...
int myNumber = 5; // Your actual number
int MyNumber {
get { return myNumber; }
set { NumberChanged(myNumber, value); myNumber = value; }
}
void NumberChanged(int oldValue, int newValue) {
// Do stuff
}
In your GUI code use MyNumber instead of myNumber. When the value is changed the NumberChanged function will be called.