UIButton

UIButton

  Button is a simple component designed to receive hover, pressed and click events, and change the color of a remote sprite. You can also optionally attach an Image Button component to the same game object to get sprite swapping functionality as well.

  UIButton提供根据事件修改UISprite的能力。呆以设置切换sprite的时间。编辑器强制Sprites->Normal和UISprite中的值一致。

  

  Tween Target用于指定本色方案,通常此处引用NGUI内置方案。

  

  If you want to trigger a remote function when you click on the button, drag & drop the target game object into the "Notify" field, then choose the function from the drop-down list. Note that in order for the function to show up, it must be of "public void FuncName (void)" type. For example:

  

参考:http://www.tasharen.com/forum/index.php?topic=6708

  

原文地址:https://www.cnblogs.com/tekkaman/p/3806752.html