playMaker

Author Topic: Mouse over GUI Button sound  (Read 5294 times)

Kothe

  • Junior Playmaker
  • **
  • Posts: 71
Mouse over GUI Button sound
« on: November 05, 2013, 12:31:26 PM »
Hi
Maybe this has been discussed but I din´t find nothing about.

I would like to add sound when the mouse is over a Gui Button
maybe is so easy or there is an action to do it, can´t find it.

Thanks in advance

pdunton

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Mouse over GUI Button sound
« Reply #1 on: November 05, 2013, 11:07:30 PM »
I'm working on the same problem if you are looking for a way to detect the mouse over part.  Go to 3 State GUI Button topic if you are.  If you are just wondering about the sound:  First, tell me how you detected it. Second just hook that up to a play sound, and when it leaves, stop the sound.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse over GUI Button sound
« Reply #2 on: November 06, 2013, 01:04:32 AM »
Hi,

 There is no easy way to know when a mouse is over a Unity GUI element unfortunatly.

 I would recommand you don't use Unity GUI for this, maybe use a Gui Texture instead, or a proper 2d framework like Ngui or 2dToolkit, they will provide you with a lot more goodies and tools to trigger sounds and effect based on 2d UI elements interactions.

bye,

 Jean

Kothe

  • Junior Playmaker
  • **
  • Posts: 71
Re: Mouse over GUI Button sound
« Reply #3 on: November 06, 2013, 05:50:59 AM »
Hi.

I have seen the 3 states Discussion but it doesn´t work in fact.
The Mouse Over works as Mouse Enter, even if you set a Mouse Over Event
you must click the buttom to go to another satate. Seems it just works for
Game Objects.

NGui must be a solution.

Cheers!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse over GUI Button sound
« Reply #4 on: November 07, 2013, 02:16:05 AM »
Hi,

 Yes, I would recommand it, either nGui or any other 2d framework you find on the asset store really ( double check it has some playmaker actions too, otherwise it will be difficult to bind the two on your own if you are not a scripting guy).

bye,

 Jean