playMaker

Author Topic: playmaker and ngui compatibility  (Read 2589 times)

mallenroh

  • Playmaker Newbie
  • *
  • Posts: 32
playmaker and ngui compatibility
« on: January 04, 2014, 01:29:56 PM »
Hi,
I am trying to get a simple playmaker fsm to work with ngui.
the fsm works as expected when it is outside of the ngui hierarchy.
it consists of a sphere that follows the mouse when it is selected-dragged around.
when i put it in the ngui hierarchy, even its the same layer as the ngui camera, the fsm stops working.
I even put debug mode on, and saw that the hit test was working for the sphere when in the
ngui camera hierarchy, but the fsm just wont work once it is in the ngui hierarchy.

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 70
  • Creating CarbonDiOxide
    • Evisystems
Re: playmaker and ngui compatibility
« Reply #1 on: January 04, 2014, 04:02:37 PM »
There is a addon to make it work, flawlessly..
It adds the extended functionallity of NGUI to playMaker

so you get to use the events such as "onClick", "mouseHoover" etc.
many features that really makes it worth it.

I highly recommend it
Asset store : https://www.assetstore.unity3d.com/#/content/10257

mallenroh

  • Playmaker Newbie
  • *
  • Posts: 32
Re: playmaker and ngui compatibility
« Reply #2 on: January 04, 2014, 05:21:29 PM »
thanks for the reply,
There was a tutorial about how to get a gameobject to follow the mouse on click drag with playmaker done awhile ago. I am trying to do the same thing, but with game objects in the ngui hierarchy. what would be the best way to approach this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: playmaker and ngui compatibility
« Reply #3 on: January 06, 2014, 08:25:17 AM »
Hi,

 Basically, ngui use layers to build its ui, so dragging your object inside a ngui hierarchy is never a good idea unless you then manually set its layer to match this nui branch.

I would build your object using ngui itself.

Also, why is your gamobject made of and why is it not a ngui sprite to begin with? maybe you have a special case to consider.

bye,

 Jean