Well...
As I told, I upgraded the latest NGUI 2.3.1., but the result was the same.
All that I modified to the NGUI is that I moved some scripts to the Plugin folder to use NGUI with the Javascript..
(Interaction/Internal/Tweening/UI folders)
When the button widget created, such a script as
UIButton.cs,
UIButtonScale.cs,
UIButtonOffset.cs,
UIButtonSound.cs
automatically also added...
I added the UIButtonMessage.cs this button widget,
and set the parameters like
- target GameObject
- function name
- trigger : OnClick or OnPress..
And the result was that only the button event didn't work on the real iOS device, my iPad2(I mean the UIButtonMessage.cs),
all other functions(button scale/offset/sound..) works normally.
(But, in the Unity Editor everything works well including UIButtonMessage.cs)
So, I doubted that there's some problems in the UIButtonMessage.cs
I removed the UIButtonMessage.cs script and
used the my own custom script and used the OnPress(), instead of using function name method in the target GameObject as follows..
This is my custom script, attached the button widget..
...
void OnPress(bool isPressed){
if(isPressed == true){
Application.LoadLevel("MyLevel1");
}
...
And this works...normally...
So I concluded the UIButtonMessage.cs has some problems on the iOS Platform...not Unity Editor,,or other platform...
Without using UIButtonMessage means that I have to create each script to every buttons...
If I have 10 different buttons, I have to create 10 scripts...oh my god..!!!
Maybe my conclusion will be wrong,,
but this conclusion is drawn by the my trial and error efforts..
So, correct it in the next version if my conclusion is right...
..from C# beginner and NGUI User...