Search Unity

PlayMaker NGUI Scripts

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

  1. merlin981

    merlin981

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

    I have a previous post about this issue. You need to remove the PlayMaker Extension Action Scripts folder from your project, do an update in Asset Store, then re-import said package. It will remove the duplicate class names.
     
  2. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    It depends on which version of NGUI, as 2.7 still uses sliderValue, while v3 of NGUI uses value instead.

    I have plans to revamp the package and toggle between the two version of NGUI, but I need to finish the networking package I'm writing first (should be another week or so).

    Until then, you can safely ignore the warnings. The code still functions properly
     
  3. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    71
    Hey Philip,

    Just installed the latest version this morning. The color multi action works a treat! Exactly what I was looking for, thank you so much for your fast support! :)

    Simon
     
  4. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Any time :)
     
  5. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    I would like to request action Playmaker Ngui. Possible actions to be Ngui: HUD Text? Thank you in advance.
     
  6. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Ok, I'll add it to the list. Should be out in about two weeks (sorry for the delay, but I'm wrapping up another request right now)
     
  7. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    thank you very much.
     
  8. Neoisrael

    Neoisrael

    Joined:
    Oct 15, 2013
    Posts:
    1
    Hi i Just got Your Scripts Package And i wanted to ask a simple qustion
    how do i detect a click on a button ? i mean i set up a new Image Button Using NGUI and created a New FSM
    i added a New State And A New Transition From the Custom - NGUI - OnClick
    But when i Click The Button It dosent Switch to the next State... Why ? How to do it correctly ?
    But in the Demo Scane It Works....
    and i got no Error On MY Console.... Help Please
     
  9. Tkfore21

    Tkfore21

    Joined:
    Jan 12, 2013
    Posts:
    23
    Loving the work you have done so far. One thing I am looking for with Playmaker, but focused at NGUI is fading out a Panel of objects. Is this something that can be added to your set of tools?
     
  10. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Sorry for the late reply...
    Do you have the Event "NGUI OnClick" going to the next state? Perhaps you can upload a screenshot of your FSM?
     
  11. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Great idea. I'll add it to the list. I have a few new things I'm wrapping up this week, and I'll try to squeeze this one in as well
     
  12. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
  13. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
  14. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I've just published a new version of PlayMaker NGUI Scripts. It usually takes Unity a few business days to approve the changes, so I would expect them to be live around Thursday (Oct 31).

    By request, I've added:
    • Usage of NGUI HUD Text
    • Fade Out (Fades out all child objects)
    • Fade In (Fades in all child objects)

    Please note that to use the HUD Text feature, you need to download the NGUI HUD Text package (http://u3d.as/content/tasharen-entertainment/ngui-hud-text/37P). The documentation includes instructions for configuring and using the HUD Text package.
     
  15. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Thanks merlin981 Ngui Hud text hopefully help me in my work. Thank you for your attention.
     
  16. Tkfore21

    Tkfore21

    Joined:
    Jan 12, 2013
    Posts:
    23
    Can not wait to try it out! Thanks!
     
  17. retox

    retox

    Joined:
    Sep 12, 2012
    Posts:
    29
    Hi I've updated and still getting around 52 issues coming up.

    Some of them are seen via screenshot, hope this helps.

    Steve
     

    Attached Files:

  18. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Those are just warnings, everything will continue to work just fine.

    NGUI 3 made a lot of changes, most notably changing the name of many functions and properties. Those warnings are from the name changes, because NGUI 3 marked the original functions as "obsolete". They still work and function as expected.

    In the next week or two, I'll be pushing out a new version of the action scripts which will have a 2.7 and 3.0 version for NGUI. Until then, though, everything still works correctly
     
  19. one3dGames

    one3dGames

    Joined:
    Oct 31, 2013
    Posts:
    3
    After import of Playmaker NGUI there are two errors playmaker gets. And they are:

    Assets/Playmaker NGUI Scripts/Scripts/Playmaker Actions/NguiSceneLoaderObjList.cs(85,13): error CS0246: The type or namespace name `UISlider' could not be found. Are you missing a using directive or an assembly reference?

    AND

    Assets/Playmaker NGUI Scripts/Scripts/Playmaker Actions/NguiSceneLoaderObjList.cs(86,13): error CS0246: The type or namespace name `UILabel' could not be found. Are you missing a using directive or an assembly reference?

    I did try to import Playmaker again as well as Playmaker NGUI but with the same results.

    NGUI was also already installed beforehand of course and the build is for iOS device.

    Is there something I'm doing wrong? Please let me know.

    Thank you
     
  20. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    The errors are that "UISlider" and "UILabel" could not be found.

    These are scripts provided by NGUI. Unfortunateley, I don't think you imported all the scripts from the NGUI package.

    These are key scripts for NGUI, as they are the basis for the NGUI slider/progressbars and text labels.
     
  21. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    Hello all, I'm having an issue with the package that I don't remember encountering before. Basically I'm trying to get a button set up to do something in NGUI using playmaker but the custom events found in the script called NGuiPlayMakerEvents don't seem to show up in playmaker. I'm using the latest version of everything I believe. Anyone know what the issue is here?

    EDIT: Ignore me, had to throw the Delegates prefab into the scene.
     
    Last edited: Nov 2, 2013
  22. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    Hi,

    Just bought your package. Just want to know how does "Ngui Scene Loader Objects" work and use? I didn't find some actions in the current Document.
     
  23. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Hey guys, just a quick update. The latest release is still "pending" approval by Unity. I submitted it on 10/25 (today is 11/4). I don't know what the delay is, but I have noticed that as the package gets more scripts, it takes longer for approval.

    I'll keep you updated and let you know when it's finally approved.
     

    Attached Files:

  24. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Glad you found the prefab :)
     
  25. merlin981

    merlin981

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

    There is a separate PDF for the scene loader documentation (Documentation\Loading Screen Doc.pdf).

    Also, there is a demo scene which shows how to configure and use the scene loader. (Demo\Loading Screen Demo\Demo - Big Scene - Loaded by Script)
     
  26. Kevron

    Kevron

    Joined:
    Mar 3, 2010
    Posts:
    1
    Hi, after updating to latest version I get this error: Assets/Playmaker NGUI Scripts/Scripts/Playmaker Actions/NguiHudTextAdd.cs(72,9): error CS0246: The type or namespace name `HUDText' could not be found. Are you missing a using directive or an assembly reference?

    I am not able to run the scene before this error is sorted out.

    EDIT: And then I read the documentation. I found out that the #define HudTextAvailable does not have comment in the script. So, if you don't have HUD´text component, you will get an error. If you comment it: // #define HudTextAvailable" - everything is good.

    Cheers,
    Tor M
     
    Last edited: Nov 5, 2013
  27. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Looks like the package was approved by Unity, but yes, I did forget to comment out that line for those of you who don't have HUDText installed.

    I have published a fix, but given the current pace of approval, it will probably be another week before you see the fix.

    In the meantime, if you don't have HUDText installed, simple comment out the #define in "Playmaker NGUI Scripts"\Scripts\"Playmaker Actions"\NguiHudTextAdd.cs

    My apologies for missing this on the last build.
     
  28. MikeJH

    MikeJH

    Joined:
    Aug 15, 2012
    Posts:
    9
    Assets/Playmaker NGUI Scripts/Scripts/Playmaker Actions/NguiHudTextAdd.cs(72,9): error CS0246: The type or namespace name `HUDText' could not be found. Are you missing a using directive or an assembly reference?
     
  29. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Please see previous post, directly above yours :)

     
  30. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Updated version of the package has been approved. This update comments out the #define on the HUDText action, so you if don't have HUDText installed you will NOT see an error.

    Remember, if you do have HUDText installed and want to use the action, you need to uncomment the #define in "Assets/Playmaker NGUI Scripts/Scripts/Playmaker Actions/NguiHudTextAdd.cs"
     
  31. mochatony

    mochatony

    Joined:
    Jul 24, 2012
    Posts:
    14
    Hello Merlin,

    I bought the package and import it, however I couldn't find the NGUI transition events from custom section of the transitions popup (there's no custom section when I right click on the state), other NGUI custom actions like "NGUI Set Active" is here.

    I am using unity 4.2.2f1, NGUI 3.0.4, playmaker 1.7.5.f2 and playmaker ngui scripts 1.8.2. How do I make this work?
    $Screen Shot 2013-11-10 at 7.08.12 PM.png

    I have attached the playmaker NGUI delegates as well, but it shows mono behaviour is missing.

    $Screen Shot 2013-11-10 at 10.00.00 PM.png

    Thank you
     
    Last edited: Nov 10, 2013
  32. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    I'm having the same problem. The script on NGUI delegates seems to be missing in this version.

    Update: Even exporting the working prefab from an earlier project into my new project doesn't work.
     
    Last edited: Nov 12, 2013
  33. mochatony

    mochatony

    Joined:
    Jul 24, 2012
    Posts:
    14
    No idea why. I create another fsm and try again, apparently the custom event for NGUI appear. :eek:
     
  34. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    I wish that would work for me! I still can't add NGUI transitions. Wouldn't you know that this would happen on a day when I have so much UI work to do!
     
  35. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    OK, I figured out what was going on. It turns out this is a symptom of screwed up meta files. I had a git problem yesterday that just happened to be around the same time I updated these scripts. It turns out fixing the meta files (which had git merge markups in them) resolved the issue. I would bet your issue was resolved by Unity itself regenerating the meta files.
     
  36. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    hey guys, sorry for the late reply. I was out of town without internet until late last night. I'm glad to hear your issues are resolved. I'll have to make a note of the meta files issue, in case anyone else has this same problem.
     
  37. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    Is there any way to swap an NGUI sprite at runtime via PlayMaker? I see a way to do it via script (yourSprite.spriteName = "Your New Sprite"; ) but I'd like to be able to do it via PlayMaker, as a part of a larger FSM. Thanks!
     
    Last edited: Nov 13, 2013
  38. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I'll add it to the requests list. I'll try to have something out for you next week
     
  39. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    Awesome--thank you! What I'm trying to do specifically is swap character portraits for an RPG. Players create a character and pick a portrait, and that's the portrait used when they get into the game. Swapping sprite images at runtime seemed like the easiest way to do that. :)
     
  40. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I've published a new version with a new action - "NGUI Set Sprite", which lets you set the sprite at run time.

    Given the holiday season, it might take Unity up to a week to approve the new version. I'll post here again once it's available on the asset store.
     
  41. liversmudge

    liversmudge

    Joined:
    Nov 29, 2013
    Posts:
    1
    Hi,

    Having issues with HUD Text Add

    I have followed Documentation , produced a child on the NGUI Panel

    However I cannot add the Child to the HUD Text Object ... the only options I get when trying to drag and drop the Child is a Get/Setter

    Have I missed something ?

    Thanks

    B
     
  42. merlin981

    merlin981

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

    That sounds like an issue with HUD Text itself. They have a forum here (http://www.tasharen.com/forum/index.php?topic=997.0), which should be able to help you with your issue.
     
  43. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    The latest version of the package is now available on the asset store. Be sure to update from within Unity.

    There are two main changes to this build:

    1) added new action "NGUI Set Sprite", which lets you set/swap UISprites at runtime
    2) updated the "NGUI Update Label Text" action to be more efficient when "Run on Every Frame" is checked
     
  44. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    Awesome and perfect timing for this--thank you!
     
  45. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I have a new Unity package just published to the Asset Store called "RGM BTree", which is a behavior tree for Unity.

    Behavior Trees are an advanced form of AI which allow for the selection of a "behavior" (or state) on each Tick of the tree system. They allow greater flexibility in designing your game AI compared to Finite State Machines (FSM).

    11 Demo Scenes are included, with detailed examples of various techniques such as navigation, waypoint following, chasing, and combat.

    RGM BTree on the Unity Asset Store

    Documentation
     
  46. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    looking great asset
     
    Last edited: Dec 17, 2013
  47. foolish-frost

    foolish-frost

    Joined:
    Mar 18, 2009
    Posts:
    169
    Got an issue that may be from a lack of knowledge:

    I can get buttons and the like to work, but sliders seem to be missing something.

    nGUI sliders are not triggering events in the attached NguiEventForwarder

    It notices hovers, clicks, and such, but the change of the slider value does not trigger anything.

    This is with me trying the debug checkbox and watching.

    This means the issue is between the nGUI slider and the NguiEventForwarder script. something is not connected?

    Your help would be appreciated.
    John Bowden

    Update:
    I tested SETTING the slider from the FSM and it works, just not getting updates.

    Oddly, I looked at the UISlider.cs and did not see anything that sends a signal to the OnSliderChange() function in the NguiEventForwarder script. Am I missing something?
     
    Last edited: Dec 18, 2013
  48. foolish-frost

    foolish-frost

    Joined:
    Mar 18, 2009
    Posts:
    169
    I was able to solve the issue in a crude manner by adding

    SendMessage( "OnSliderChange",value,SendMessageOptions.DontRequireReceiver);

    into the UISlider.cs script in the following code:

    protected void OnDragForeground (GameObject go, Vector2 delta)
    {
    if (UICamera.currentScheme == UICamera.ControlScheme.Controller) return;
    mCam = UICamera.currentCamera;
    value = mOffset + ScreenToValue(UICamera.lastTouchPosition);
    SendMessage( "OnSliderChange",value,SendMessageOptions.DontRequireReceiver);
    }

    It's a brute-force method, but not sure what to do since nGUI does not seem to actually send the signal or have code to do so.
     
  49. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    Did you set the "Event Recv." and "Function" properties in the UISlider component (see attached screenshot)?

    $2013-12-18 09_23_49-.png
     
  50. foolish-frost

    foolish-frost

    Joined:
    Mar 18, 2009
    Posts:
    169
    May want to check the latest version of nGUI, it looks different now.

    It's a new category called On Value Change, and includes options for Notify and Method. When filling those out similar to what you offer above, nothing seems to happen. I turned on the Debug checkbox, and the NguiEventForwarder is not recieving anything about the slider changing value. It DOES note hover and clicks, though.

    Any thoughts?