I am using the new UI Button. I want a function to put under the OnClick Component. I want a function that I can reuse and just change 1 thing. Thats what I’m trying to do.
How do I change a variable in another script by, with a single function?
like:
void Change(ThingToChange){
VariableScript.ThingToChange = "Something";
}
Not:
void ChangeTest1(){
test1 = "blabla";
}
void ChangeTest2(){
test2 = "blabla2";
}
And so on. That I what is don’t want to do! I want to have only 1 void/ function that I can reuse.