Author Topic: OnHover() issue  (Read 2402 times)

Zenneth

  • Guest
OnHover() issue
« on: July 31, 2012, 03:18:36 PM »
Hi, I wanted to instantiate a GameObject when the mouse entered the Sprite, then Destroy it when exit.

I got the instantiate part covered, but couldn't figure out the Destroy when leave part.

Could anyone help me on this?

Regards,

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: OnHover() issue
« Reply #1 on: July 31, 2012, 10:23:04 PM »
When you get OnHover(false), NGUITools.Destroy(yourGameObject).