Unity3d OnHover 为什么在点击抬起的时候会触发

本雍 2016-04-14 03:04:16
void OnHover(bool isHover)
{
if (isHover)
{
print("进入");
}
else
{
print("退出");
}
}


在点击抬起的时候会打印 “进入” ,不知道是不是bug。
...全文
2172 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
cchvsgame 2016-05-28
  • 打赏
  • 举报
回复
不是,理解正确就行
- NEW: Created a new layout system. All widgets and panels can now anchor to each other, the screen, and even 3D game objects. - NEW: You can now create resizable scroll views and anchor them to UI elements. - NEW: Re-created the Anchor Example to use the new anchoring system. - NEW: Updated all controls to use the new anchoring system. - NEW: You can now specify an explicit Render Queue on each panel. - NEW: Improved the Text List's functionality, adding support for touch interaction and having a scroll bar. - NEW: Recreated the Chat Window example -- it now features a resizable chat window. - NEW: Recreated the Drag & Drop example, adding two scroll views resized with screen height, and the ability to move items from one to the other. - NEW: Holding CTRL will now show the dimensions of the selected widget in the scene view. - NEW: Resizing the widget now automatically displays width and height guides in the scene view. - NEW: Selected anchored widgets and panels now show the calculated distance in the scene view. - NEW: Widget alpha is now fully cumulative (parents affect children). - NEW: UIDragObject script now ensures that the dragged object remains pixel-perfect. - NEW: UIDragObject script now can restrict the widget from being dragged off-screen. - NEW: Added a script that makes it possible to resize a widget by dragging on its corner or side. - NEW: UICamera.currentScheme tells you the current control scheme -- mouse, touch, or controller. - NEW: Button scripts have been modified to use the new OnDragOver/Out events - NEW: Added an option to the widget anchor to hide itself if it's off-screen. - NEW: Drag Object script now lets you specify an explicit bounds rectangle and has an improved inspector. - NEW: Added a button to UIButtonColor that can automatically replace it with a UIButton. - NEW: Added the ability to copy/paste all values of the sprites and labels via right-click on the component. - NEW: Added a "next page threshold" value to UICenterOnChild for when you want to swipe to move to the next page. - NEW: If the mouse events are off and touch events are on, NGUI will now fake touches using the mouse in the editor. - FIX: Changing panel depth in inspector will now reflect the change correctly. - FIX: Atlas/font selection dialog will now make searching of the entire project optional. - FIX: UICamera events will once again work independently of time scale. - FIX: Fixed the glitch that was causing widgets to jump into the middle of nowhere sometimes when resizing them. - FIX: UIDragScrollView will no longer try to find the scroll view if you set it manually. - FIX: Enabling and disabling textures and Unity 2D sprites will now again set the correct texture. - FIX: Adjusting depths via shortcut keys should now work consistently. - FIX: Draw call viewer will now display the correct triangle count. - FIX: NGUITools.SetActive will now automatically call CreatePanel on widgets, ensuring that there is no frame delay (read: blinking). - FIX: UICamera selected object change should now work multiple times per frame. - FIX: Added a new clause to panel depth comparison that uses panel instance IDs if the panel depth matches (to avoid depth collisions). - FIX: Max line count on labels should now work again. - FIX: Fixed the Drag Objects script on mobile devices. It was not applying momentum properly. - DEL: OnHover is no longer sent via selection changes. Listen to OnSelect and check (UICamera.currentScheme == ControlScheme.Controller). - DEL: "PMA Shader" option is now going to be permanently hidden once the atlas has been created. - DEL: Eliminated the half-pixel offset setting from anchors. - DEL: Removed anchor and stretch scripts from the menus. - NEW: Further improved the layout system's presentation, making it less daunting. - NEW: Enabling anchoring will automatically anchor to the first parent by default. - NEW: It's now possible to automatically anchor to the mid-points (sides, center). - NEW: Made it possible to move and scale anchored widgets. - FIX: Rotating a widget should no longer hide its side handles. - FIX: Mobile keyboard will now have the multi-line option. - FIX: Re-added support for packed fonts.

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧