Search Unity

PlayMaker NGUI Scripts

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

  1. Mazhari

    Mazhari

    Joined:
    Sep 3, 2013
    Posts:
    6
    Hi,
    I just bought your PlayMaker NGUI script.
    After I import PM and PM NGUI script package I got error ;
    "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?"
    so how can I solve this ?
    Thanks

    --------------
    uups... I forgot to import NGUI first. It solved.
    Sory for my noob question
     
    Last edited: Sep 4, 2013
  2. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    No worries, glad you got it working
     
  3. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Just imported your latest version and received two errors:

    and

    Thanks Merlin!
     
  4. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    I published a fix for this on the "PlayMaker Extension Scripts" package, earlier today. It should be available for download by the end of the week.

    Until then, you can delete one copy of "ColorFromString.cs" and one copy of "StringCompareMulti.cs". They are duplicates of each other, so you can safely delete either instance.
     
  5. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Copy that. :D
     
  6. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Hi,

    How to use asset bundle in offline?

    Thank you in advance.

    Dev
     
  7. merlin981

    merlin981

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

    Just change the URL from "http://" to "file://", everything else remains the same.

    You can check the Asset Bundle page (http://docs.unity3d.com/Documentation/Manual/AssetBundlesIntro.html) for a detailed explanation of how they work.
     
  8. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Hi,

    Thanks for help.

    Dev
     
  9. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722

    Great work man.keep it up.:p:):D:D
     
  10. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Thank you. I have some new stuff coming out, hopefully by the end of next week. I'll share more as the release date gets closer :)
     
  11. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    I bought your asset. Seems like a good product. Sera I'm doing something wrong? I received a number of alerts.
    $error.jpg
     
  12. Tkfore21

    Tkfore21

    Joined:
    Jan 12, 2013
    Posts:
    23
    Updated to the latest version of your tool set, but now I'm getting the following error:
    Assets/Playmaker NGUI Scripts/Scripts/Playmaker Actions/NguiSetActive.cs(12,14): error CS0101: The namespace `global::' already contains a definition for `NguiSetActive', which is now preventing me from testing my app.
    Any recommendations on how to fix this?
     
  13. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Yeah, those are just warnings that one of the Unity functions is out of date. You can safely ignore them.
     
  14. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Do you have duplicate copies of the package in your project? That error is shown because the filename "NguiSetActive.cs" exists twice in your project.
     
  15. KenAporia

    KenAporia

    Joined:
    Jan 8, 2013
    Posts:
    3
    Any chance you could make 2 actions for Scroll Bar Value comparable to the 2 you have for Slider Value? I tried duplicating the NGUI Set Slider Value script, renaming it to NGUI Set Scroll Value and then editing it to work for the UIScrollBar script, but no go. My scripting skills are not up to it.

    Thanks for all your work so far, it has been very helpful.
     
  16. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Sure, I'll add to my list, but I may not get to it until next week
     
  17. KenAporia

    KenAporia

    Joined:
    Jan 8, 2013
    Posts:
    3
    For what it's worth, here's what I did:

    using HutongGames.PlayMaker;

    /*
    * *************************************************************************************
    * Created by: Rocket Games Mobile (http://www.rocketgamesmobile.com), 2013
    * For use in Unity 3.5, Unity 4.0+
    * *************************************************************************************
    */

    [ActionCategory("NGUI")]
    [Tooltip("Sets the value of an NGUI Scroll Bar")]
    public class NguiSetScrollValue : FsmStateAction
    {
    [RequiredField]
    [Tooltip("NGUI scroll bar to update")]
    public FsmOwnerDefault NguiScrollBar;

    [RequiredField]
    [Tooltip("The new value to assign to the scroll bar")]
    public FsmFloat value;

    [UIHint(UIHint.Variable)]
    [Tooltip("Save the value to a variable")]
    public FsmFloat saveValue;

    public override void Reset()
    {
    NguiScrollBar = null;
    value = null;
    saveValue = null;
    }

    public override void OnEnter()
    {
    DoSetScrollValue();
    Finish();
    }

    private void DoSetScrollValue()
    {
    // exit if objects are null
    if ((NguiScrollBar == null) || (value == null))
    return;

    // get the object as a progressbar
    UIScrollBar NguiSroll = Fsm.GetOwnerDefaultTarget(NguiScrollBar).GetComponent<UIScrollBar>();

    // exit if no slider
    if (NguiScroll == null)
    return;

    // set value
    NguiScroll.scrollValue = value.Value;

    // save value
    if (saveValue != null)
    saveValue.Value = value.Value;
    }
    }
     
  18. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Latest version of the package has been approved by Unity and is now available in the Asset store.

    This new version renamed some files in the package, so please make sure you delete the original version of the package from your project before you import the new one. Otherwise, you will probably have errors
     
  19. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Please check, I now have a lot of errors. After 3.0 update Ngui. Could fix this.
     
  20. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Can you tell me what errors you have? Are they errors with NGUI, or with this asset package?
     
  21. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    When I import the package NG Scripts. I'm using GUI 3.0b. Playmaker 1.7.4 and Unity3d 4.2.1f4. In fact for which alerts are already mentioned, but appeared new alerts. Can I ignore this or I will have problems later?
     
  22. julioamancio

    julioamancio

    Joined:
    Mar 6, 2013
    Posts:
    3
    I bought the NGUI tool but it keep giving me this errors below, Can you help me solve it please, because I already deleted everything and reentall the last update and still this erros.

    Assets/NGUI/Scripts/Interaction/UIPlayTween.cs(40,52): error CS0117: `Direction' does not contain a definition for `Forward'
    Assets/NGUI/Scripts/Interaction/UIPlayAnimation.cs(40,52): error CS0117: `Direction' does not contain a definition for `Forward'
    Assets/NGUI/Scripts/Internal/ActiveAnimation.cs(36,46): error CS0117: `Direction' does not contain a definition for `Toggle'
    Assets/NGUI/Scripts/Internal/ActiveAnimation.cs(37,49): error CS0117: `Direction' does not contain a definition for `Toggle'

    Thanks

    Julio Amanico
     
  23. julioamancio

    julioamancio

    Joined:
    Mar 6, 2013
    Posts:
    3
    I bought the NGUI tool but it keep giving me this errors below, Can you help me solve it please, because I already deleted everything and reentall the last update and still this erros.

    Assets/NGUI/Scripts/Interaction/UIPlayTween.cs(40,52): error CS0117: `Direction' does not contain a definition for `Forward'
    Assets/NGUI/Scripts/Interaction/UIPlayAnimation.cs(40,52): error CS0117: `Direction' does not contain a definition for `Forward'
    Assets/NGUI/Scripts/Internal/ActiveAnimation.cs(36,46): error CS0117: `Direction' does not contain a definition for `Toggle'
    Assets/NGUI/Scripts/Internal/ActiveAnimation.cs(37,49): error CS0117: `Direction' does not contain a definition for `Toggle'

    Thanks

    Julio Amanico
     
  24. merlin981

    merlin981

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

    Those are errors from the NGUI package, not from my script package. You'll need to contact the NGUI developer. Their support forum is: http://www.tasharen.com/forum/index.php?board=1.0

    Thanks,
    Philip
     
  25. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Without seeing the list of warnings you're seeing, I can only give you general advice - If you're only seeing warnings, you should be able to ignore them (most of the time)
     
  26. Alarial

    Alarial

    Joined:
    Sep 24, 2013
    Posts:
    4
    After latest update, I started seeing FSM errors on the Camera - Scene Loader prefab. I also recently updated NGUI, so I opened up a project with updated NGUI (3.0.0) and original NGUI (2.7.0) and saw the problem on both. I haven't tried opening an older version of Playmaker NGUI Scripts yet.

    $2013-09-23_21-46-11.png
     
  27. Alarial

    Alarial

    Joined:
    Sep 24, 2013
    Posts:
    4
    By the way... thanks for the awesome package! :) I apologize that my first post was reporting a problem. This is exactly what I needed to link things together.
     
  28. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    Hello Alarial,

    Is that from the scene pre-loader demo scene?
     
  29. Alarial

    Alarial

    Joined:
    Sep 24, 2013
    Posts:
    4
    Yes, is probably where it is used. It is just the Camera - Scene Loader prefab under Playmaker NGUI Scripts => Prefabs. Sorry for not making the screenshot wider to show the object path.

    I suppose I should mention, although it may be assumed, that I am not actually using this prefab anywhere. Playmaker FSM errors just show that there is an issue with an FSM attached to a prefab in my project.
     
    Last edited: Sep 24, 2013
  30. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    You have to create the objects for your scene... the progressbar, label, etc. You can copy the ones from the demo scene, or create your own NGUI version of them.
     
  31. Alarial

    Alarial

    Joined:
    Sep 24, 2013
    Posts:
    4
    Ahh, I see. If I get rid of the demo folder, everything is right in the world again. I knew I wasn't using it, but I didn't think about the demo scene using it. Thanks for the reply.
     
  32. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Good, I'm glad you got it working
     
  33. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    So have you tested this with nGUI 3.0, PlayMaker 1.74, Unity 3.4.2.1f4?
     
  34. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    This asset requires at least Unity 3.5. I have tested against the latest version of NGUI, PlayMaker, and Unity 3.5, 4.0, 4.1, and 4.2
     
  35. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    New version submitted to Unity, should be live in a few days.

    This new version has the following new items:
    * Added “NGUI Scrollbar Change Listener"
    * Added “NGUI Scrollbar Get Value”
    * Added “NGUI Scrollbar Set Value”
    * Added new demo scene for scrollbar actions

    The demo scene shows to set the scrollbar, listen for scroll changes, and read the value of the scrollbar.
     

    Attached Files:

  36. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    71
    Heya Merlin,

    I bought your assets a few weeks ago and I must say that it has saved me countless hours of work, thank you!

    I have a question regarding colors; is it possible to have GUI elements and widgets point to a "master" color then when I call the "Ngui set widget color" action it changes the color of all elements and widgets that point to that color?

    I ask this because I would like to have different color themes for my GUI and currently I would have to set the color for each GUI element manually.

    Is this currently possible or would it require a custom script/action?

    Cheers,

    Simon
     
  37. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    Hi Simon,

    I could create a script that accepts a list of widgets, and a single color, then would update all widgets with that color. Would this work for you?
     
  38. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Simon,

    I've added the new NguiSetWidgetColorMulti action, but I have to wait for the current submission to Unity to be approved (should be today or tomorrow). Once it's approved, I'll submit this new version with your new action.

    Thanks,
    Philip
     
  39. GrooGadgets

    GrooGadgets

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

    Thank you so much for you speedy response! Can't wait to try out the new action.

    Thanks again,

    Simon
     
  40. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    I've submitted the new action for review. It probably won't be available until Monday or Tuesday though. It takes them a while to review and approve some times.
     
  41. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    88
    I'm seeing this, too, but I've got NGUI (v3.0.1) in my project. Also:

    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?

    Not sure how to fix...
     
  42. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    If you're seeing that error, then you don't have all the NGUI scripts in your project. UILabel is a script from NGUI. Please re-import NGUI into your project.
     
  43. greay

    greay

    Joined:
    Mar 23, 2011
    Posts:
    88
    Oh, man, I feel stupid. I thought the NGUI v3.0.1 in the package was a static library. It's another package, though. Importing that fixed the errors (but now there's lots of warnings). The warnings I can fix.
     
  44. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    No worries. I missed it too, the first time I upgrade my NGUI package.
     
  45. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    Latest version of PlayMaker NGUI Scripts is now live in the Asset Store, with new actions (such as Ngui Set Widget Color Multi).
     
  46. LaralynM

    LaralynM

    Joined:
    Sep 30, 2013
    Posts:
    24
    This may be obvious, but I'm new to PlayMaker and to NGUI. Is there a way to prevent clicks on NGUI objects from being passed through to Unity gameobjects below? When I looked into it, I saw a few ways to address it via script, but I'd prefer to keep it all in PlayMaker. Thanks!
     
  47. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Just a heads up:

    I had duplicate classes for ColorFromString and StringCompareMulti between your Extensions and NGUI scripts.

    Promptly updating Extensions, I see you fixed it to a degree, renaming them ColorFromString2 and StringCompareMulti2, but I still had to rename the classes in each by adding 2 to the end of each in your code.

    That or I'm a noob and missed something else entirely?

    -Steve
     
  48. johnny12345

    johnny12345

    Joined:
    Oct 8, 2012
    Posts:
    45
    not sure if this is my fault but soon as I imported the new package I got this show up,any ideas
    Playmaker NGUI Scripts/Scripts/Playmaker Actions/NguiSliderValueToPercentLabel.cs(71,40): warning CS0618: `UISlider.sliderValue' is obsolete: `Use 'value' instead'
     
  49. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    I've told the developer about it. He said it can be ignored. I think it should be fixed, and there are several warnings like this
     
  50. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305
    HI LaralynM, that's really an NGUI question. I did a quick Google search, and found one possible answer for you. If this doesn't work, I'd recommend visiting the NGUI Forums (http://www.tasharen.com/forum/)