Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PlayMaker NGUI Scripts

Discussion in 'Assets and Asset Store' started by merlin981, Jul 26, 2013.

  1. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    I tried adding NGuiPlayMakerEvents.cs to the Playmaker NGUI Delegates prefab (it seemed like the most logical script to contain the event definitions) but that doesnt help either (I even reimported the package and closed and reopened Unity).
     
  2. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    It seems to work with the NguiPlaymakerProxy.cs script found in the free Ngui package on the playmaker site.

    Although I dont know if this is the correct script or way to do all this? I dont know if your custom NGUI events (the ones exclusive to your package and not available in the free ngui playmaker package) are visible/working now.
     
  3. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    I responded to your email and sent you a unitypackage file that will restore the missing prefab.

    For everyone else, I've submitted a new version of the script package which includes a unitypackage in the Prefabs folder. If your NGUI Delegates prefab is "broken", you can run this unitypackage to restore it.

    I'm also attaching the unitypackage here, in case you need it now before Unity approves the new version.
     

    Attached Files:

  4. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    That proxy script has some of the same event names, but it doesn't contain the full list and I believe one or two are actually named slightly differently.

    In either case, my previous post includes a unitypackage to restore the missing prefab.
     
  5. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Thanks so much for the reply and the email. The package fixed everything, it works perfectly now. Thanks for such an amazing plugin and keep up the fantastic work.
     
  6. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Thanks. Glad it helps you :)
     
  7. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Thanks for the App,
    I wish a video tutorial.
    I'm thinking to purchase it.
     
  8. edufurla

    edufurla

    Joined:
    Mar 7, 2014
    Posts:
    19
    Hi.

    I am trying to make a drag and drop setup.
    I use UIDragDropitem script from NGUI in a sprite and a UIDragDropContainer in another three sprites.
    I am able to drag and drop the item inside the containers but can’t find a way to NGUI PLAYMAKER see that.
    I want to use events like ON DROP or ON DRAG FINISHED but it’s not working. ( If I use a button the ON CLICK work fine.)
    Thanks
     
  9. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    I believe you'll need to set it in the Notify section of the drag drop container. I haven't used the UIDragDropContainer in a while, but I believe he changed how it receives events in v3 to use the Notify functions.
     
  10. edufurla

    edufurla

    Joined:
    Mar 7, 2014
    Posts:
    19
    Hi. Thank you for your answer, but I am new in NGUI-Playmaker.
    Where can I set the Notify?

    We have a lot of transitions to choose, but until now I only used ONCLICK and worked fine.

    You know if are there some tutorial or documentation about what is need to each transition work?
    The ON DRAG is working, but the strange thing is the ON DROP isn’t.
    $events.jpg
     
  11. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    If you look at the demo scene I provided ("Demo Scene"), look at the slider game object. The drag drop component should have a similar event section.

    $Notify.png
     
    Last edited: Mar 14, 2014
  12. edufurla

    edufurla

    Joined:
    Mar 7, 2014
    Posts:
    19
    Thank you for you answer, but unfortunately I am using a script from ngui that do not have a notify panel. “UIDragDropItem”
    Maybe the notify panel is present only in the most used scripts.
     
  13. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I'll take a look at this later this week, early next week.
     
  14. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hello I am new to Playmaker and NGUI so please bear with me if this is a stupid question. I don't know if this is possible either with Playermaker's built-in NGUI package or your package...

    How can I target the same FSM with 2 different NGUI buttons and have them execute different actions depending on which button was clicked?

    For example, let's say I have a Movement FSM on my player character, and my NGUI user interface has two buttons than I can click: a "Jump" button and a "Sprint" button. How do I have the FSM detect which of the two NGUI buttons was clicked so that the FSM can put my player into the proper Jump state or Sprint state?

    Right now I'm looking at the documentation for Playmaker's NGUI package and your own package and they seem to make an FSM use an ONCLICK or similar transition to detect NGUI activity... however, it doesn't seem to differentiate between different buttons. So that pressing either a Jump button or a Duck button will both fire off the same ONCLICK event on the FSM.

    Am I missing something really basic? Thanks!
     
  15. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Hi,

    Thanks for buying my scripts.

    If you're doing everything with PlayMaker, the way I would probably handle this is for each button to have it's own FSM that only handles activating one state.

    So the Jump button has an FSM that sets the Jump flag when clicked, and the duck has an FSM that sets the Duck flag.

    You have a master FSM on a separate object which has these flags (variables) as Global variables, which the Jump/Duck FSMs can then access and set.

    Does this answer your question?

    2).
     
  16. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Hello. I have PlayMaker and NGUI and this asset (PlayMaker NGUI Scripts) already. BUT I don't have Tasharen HUD Text yet. I am thinking of buying it. I Haven't used PlayMaker NGUI Scripts yet but I noticed in the Asset Store description that it supports HUD Text. Is this true? I imported PlayMaker NGUI Scripts but I don't see any actions that are specific to HUD Text.
     
  17. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Yes, it does work with HUD Text. Currently, it supports "HUD Text Add", which is the main function to display text above an object.

    If you look at the table of contents for the documentation of NGUI PlayMaker Scripts, the section is titled "NGUI HUD Text Add".

    Please be aware that there is a compiler directive on this class to prevent it from loading when a user does Not have HUD Text installed. The instructions in the documentation walk you through setting it up for your project (really just removing a comment mark).
     
  18. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    I'm trying to figure out how to detect when you've stopped dragging something. I want to simulate the behavior that if you drag and drop something into anything other than a container, it snaps back to its original location. I figured I would do that by hiding the original while you drag the clone, and when you drop it, animate it back to the start location then show the original again.

    The problem I'm having is that no event seems to fire when I release the dragged object. I have an ON DRAG FINISHED event on the object, and I have the NGUI Event Forwarder script on the object as well with the FSM set to its own (where the drag is controlled). The ON DRAG event fires correctly--it's just the ON DRAG FINISHED that doesn't. Is there something else I need to hook up?

    Thanks!
     
  19. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I'm out of the office for a week, celebrating my new baby girl, so please excuse any delayed response...

    Did you set the Notify property on the component you want to receive the On Drag Finished event? This is a new feature of NGUI. If that doesn't work, NGUI also provides an EventForwarder component that I think will handle the On Drag Finished event (will pass it back to your script).
     
  20. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    Congratulations! :)

    I'll give that a shot and let you know if it works.
     
  21. Sargonius

    Sargonius

    Joined:
    Nov 18, 2013
    Posts:
    15

    Any progress with this problem?
    For some reason the quote didn't paste well :)
     
    Last edited: May 8, 2014
  22. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I believe we discussed this at some length a few months back, and I did publish a fix for it. The issue was the internal reference to the label wasn't being updated when the FSM state restarted.
     
  23. Sargonius

    Sargonius

    Joined:
    Nov 18, 2013
    Posts:
    15
    Can you please tell me how to fix it? I searched the whole theme, but nothing worked. How can I update internal reference to the label?
     
  24. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Do you have the latest version? I published this fix about two releases ago -
    v 3.1 * resolved an issue where a few actions (for example "NGUI Update Label Text") were not refreshing their reference to the game object on each iteration of the FSM
     
  25. Sargonius

    Sargonius

    Joined:
    Nov 18, 2013
    Posts:
    15
    Yep, latest version. I tried to clean up the code, but even this simple structure works only once. Any ideas how can I fix it?
    $8IfIt.png
     
  26. Sargonius

    Sargonius

    Joined:
    Nov 18, 2013
    Posts:
    15
    Still looking for solution. Tried every possible variant :-(
     
  27. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Can you pm me a link to your project code? I should have some time, tomorrow, to look at it. Thanks
     
  28. swtichblade327

    swtichblade327

    Joined:
    May 27, 2013
    Posts:
    2
    EDITED: fixed my problem by compile problem by nuking the NGUI folder in my project and re-importing NGUI.
     

    Attached Files:

    Last edited: May 21, 2014
  29. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    330
    I am also having issues with the "Ngui Update Label Text" action, I am using your latest update. It works half the time, in certain states it doesn't work atall. I think there may still be an issue to be resolved with this one.

    In most cases it just seems to fire only once, and then it doesn't update anymore.

    I PM'd you with a sample scene so you can see the issue first hand.
     
    Last edited: May 21, 2014
  30. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Yeap, that's the solution. When you imported the free version, it overwrote some files of the current version of NGUI. I'm going to remove the free version, since it's actually the old 2.7 version of NGUI.
     
  31. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I received your PM. I'll look into this week. I'm pretty swamped with work this week (working overtime on a project), but I'll do my best to set aside some time to look into your issue.
     
  32. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    330
    Thanks merlin.
     
  33. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    not working with Unity 4.5 playmaker Ngui have been updated there packages ,. this needs to be update as well =(
     
  34. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
  35. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    please update it's not working with 4.5 unity ,. Playmaker and Ngui has updated please do the same

    Why do i have to buy ANOTHER $15 plugin because your to lazy to update ???
     
  36. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    For better actions, + instance Support (every hour), update same way with NGUI and PlayMaker :D
     
  37. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    my review of the above spammer's product https://www.assetstore.unity3d.com/en/#!/content/17920

    I did waste my money on this Merlin981 so please update your asset so no one else makes my mistake.

    my review of Ngui ACTION+++ for PlayMaker

    I got Ngui ACTION+++ for PlayMaker due to PlayMaker NGUI Scripts has not been updated for Unity 4.5 yet, and i was on a deadline.. but this one is missing some important items, HUD is missing, Sliders access is also missing and that what iv'e found in just the first few hours I've been using it I'm sure there more missing.

    I ended up moving back to Unity 4.3 so I could use PlayMaker NGUI Scripts again,. Ngui ACTION+++ for PlayMaker is wasted money if you already have the PlayMaker NGUI Scripts .



    and spamming someone else product page Gunhi is pretty underhanded and negative, I already knew about your product and saw it had been updated after 4.5 was released.. I should have seen the negative attitude shown and avoided ,.I should have just moved back to unity 4.3 and saved the money.. lesson learnt.
     
  38. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I've sent an update to Unity, which should be available in a few days. This update resolves issues with Playmaker's changes of their Tooltip attribute, and attempts to (finally?) resolve the UpdateLabel reference issue (for those who try to call UpdateLabel every frame).
     
  39. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Added the following to all playMaker NGUI scripts that gave me the Tooltip error.

    using Tooltip = HutongGames.PlayMaker.TooltipAttribute;

    As per the playMaker 4.5 update post.

    Took me a couple minutes to do and this resolved my issues.
     
  40. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    I think your "Lazy" comment is totally uncalled for. In less then 5 minutes I discovered the issue and was able to update the playMaker NGUI scripts that needed a single line of code, see above post, and everything works fine in 4.5. Many third party playMaker assets will have this issue and it will take a little bit of time for all of them to add the fix and post/submit the update

    A little patience and a brief investigation would have saved you your frustration and $15 to boot.

    We are all here doing really cool stuff. So please let's keep cool heads while doing so.
     
    Last edited: Jun 5, 2014
  41. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    One more thing, Never, ever update software or plug-ins in the middle of a project with a looming deadline unless you absolutely have too. It is the quickest way to screw your day. All major updates should be taken cautiously and knowing that all may not work out of the box.

    I always add the old version number to the Unity Folder and then install the new release. This way I can always launch the old one if need be. Combine this with fully backing up your project to another folder will allow you to test the new builds and immediately go back if there are issues with no down time.

    Food for thought.
    :)
     
  42. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Thanks. I submitted a fix for this, this morning to Unity. It usually takes them several days to approve, so hopefully this will available by the middle of next week.
     
  43. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264

    Excellent! By the way, Your playMaker NGUI scripts are great! Use them in every project I do.
     
  44. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Thank you very much. I'm glad you like them :)
     
  45. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
  46. ArtPose

    ArtPose

    Joined:
    Jun 13, 2014
    Posts:
    3
    Downloaded your update. Still getting the same error the second your scripts are set up in a fresh Project. I really need
    this to be fixed so I can move to 4.5. So either you uploaded the wrong version or unity is still downloading a old package.
    Please fix this as soon as you can.

    Thanks

    P.s I deleted the old package that was downloaded and made sure its a fresh download from the
    unity store. The error is present with the current download. I had to delete 5 playmaker scripts just
    to build a blank scene. Hopefully I don't need those.
     
    Last edited: Jun 13, 2014
  47. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Submitting a new version to the asset store now.

    NOTE: This new version is built on the following components:
    • Unity 4.5
    • NGUI 3.6.4b
    • PlayMaker 1.7.7.1
     
  48. ColeBKray

    ColeBKray

    Joined:
    Dec 18, 2011
    Posts:
    36
    Hi,

    I ran into a problem:

    I created a Label Prefab, then, with Playmaker I used Create Object to create that prefab, and stored it in a GameObject variable.

    When using Update Label Text, I choose "Specifiy Game Object", and specified the GameObject variable, that stored the newly created Label prefab. The text didn't update. What should I do?
     
  49. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Hi Cole,

    Can you PM me the code or some screenshots so I can help troubleshoot?

    Thanks,
    Philip
     
  50. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    I am also having the NGUI Update Label issue as stated previously;

    "In most cases it just seems to fire only once, and then it doesn't update anymore."

    I have an object that rotates at 45deg increments and a simple compass widget that shows the general direction, N, NE, E, SE, S etc...

    I am using strings to update the label. Each string will work once and then it will not update the label even though I see the function firing.

    Any help would be appreciated.

    Screen Shot 2014-06-22 at 2.33.42 PM.png Screen Shot 2014-06-22 at 2.34.36 PM.png