public void runsWhenButtonClicked(string a, string b)
{
print(“why wont this possible??”);
}
or
`public void runsWhenButtonClicked(string a)
{
}`
why cant i call this muti parameter method at ui button OnClick() ??
why wont it work like assigning public variables in editor…
no idea @softmarshmallow. but the following lines
// call this variable and assign stringA at OnClick() of your UI button
public string stringA { private get; set; }
// call this function and assign stringB at OnClick() of your UI button
public void RunsWhenButtonClicked(string stringB)
{
DoSomethingWithMyTwoStrings(stringA, stringB);
}
should do it.