Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: chukaishing on October 16, 2016, 04:02:47 PM
-
I has two method like that
public void Foo () {
}
public void Foo (string str) {
}
I try to add Foo () to UIButton on click event, and I get this error:
"Could not find method 'Foo' on FooScript"
NGUI version is 3.10.2
This is a bug? and that will fix in future?
-
You should have them uniquely named. The script that finds the delegate by name is pretty rudimentary. I was only learning reflection back when I wrote it. Just keep them named differently.
-
You should have them uniquely named. The script that finds the delegate by name is pretty rudimentary. I was only learning reflection back when I wrote it. Just keep them named differently.
Tanks for your reply.
In my case, Foo() and Foo(string) must be exist.
I just add a method like that to fix now:
void FooForNGUI () { Foo(); }
I want to know, the reflection problem will fix in future?
If yes, I will still to waiting the update.