Search Unity

DoozyUI: Complete UI Management System

Discussion in 'Assets and Asset Store' started by AlexMares, Apr 13, 2016.

?

Would you like to see a free version of DoozyUI with limited features?

Poll closed May 12, 2016.
  1. Yes

    1 vote(s)
    33.3%
  2. No

    2 vote(s)
    66.7%
  1. akiwy

    akiwy

    Joined:
    Mar 9, 2017
    Posts:
    1
    Hello, we are working with the latest version of Text Mesh Pro (free version provided by Unity) and Doozy UI 2.8.0p7. We have tried to add the scripting symbols as explained above, having this line "DOTWEEN_TMP;dUI_DoozyUI;dUI_TextMeshPro". However, the texts are not being displayed at all in run time.
    It works fine when design it on the editor:
    Editor-Prefab-NoRunTime.png

    But when we launch the game the prefab gets hidden by the text (observe the text is selected in the bottom of the image, the picture frame is hidden without reason):
    RunTime-TextOnPrefab.png

    If we move the text out of the picture frame then it shows up again (observe the text is selected at the top of the image):
    RunTime-MoveTextOutOfPrefab.png

    How can we solve this?

    Thanks
     
  2. Zanderfax

    Zanderfax

    Joined:
    Nov 2, 2016
    Posts:
    25
    Thanks for the info.
     
  3. Zanderfax

    Zanderfax

    Joined:
    Nov 2, 2016
    Posts:
    25
    @allemaar,

    Since data is not allowed to be sent with an event currently, is there a way to set a button's name dynamically and register it? If so, is there example code somewhere to show how this is done?

    Z
     
  4. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    pageAboutDoozyUIVersion.png
    Submitted for review!
    PLEASE BACKUP PROJECTS BEFORE UPDATING!!!
    Please let us know if you find any bugs (or solutions) so that we can improve the asset as fast as possible.

    ------
    Version 2.8.0p8
    ------
    Changed the behaviour of the 'Back' button when the game is paused. If the game is paused, the 'Back' button will not automatically unapause the game anymore. You need to send either a 'TogglePause' game event or call UIManager.TogglePause() from code.

    Reduced the overall system memory consumption by optimizing code structure and reducing unnecessary allocations.
    Reduced the HierarchyManager's memory consumption by optimizing code structure.
    Reduced the UIManager's memory consumption by elimitating the unecessary creation of coroutines.
    Optimized the UIButton preset loading algorithm.

    Fixed a major issue with the singleton pattern used by the UIManager. Singleton control belongs now in the constructor (Awake), and not in the accessor (Instance).

    Fixed a minor issue with the UpgradeManager that tried to execute in play mode.
    Fixed a minor issue with the UIButton that used deltaTime instead of unscaledDeltaTime for the doubleClickTimeoutCounter and the longClickTimeoutCounter calculations. Button clicks were previously affected by game time.
    Fixed a minor issue with the UIElement ResetRectTransform. The ResetRectTransform method didn't take into account if a customStartPosition was used or not, thus it would reset to the startPosition regardless. Now the reset behaves as expected.
     
  5. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
  6. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
  7. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
  8. imgumby

    imgumby

    Joined:
    Nov 26, 2015
    Posts:
    122
    Anyone else getting a "Could not read from encrypted package file." error when trying to update this morning ?Using Unity 2017.1
    thanks
     
  9. JasonVSG

    JasonVSG

    Joined:
    Jun 22, 2016
    Posts:
    29
    @imgumby
    I can't download/update with Unity 2017 or 5.6.2f3. Completely broken for me to get an update for this.

    Edit: I went back to 5.6.0f3, and still no luck.
    "Could not read from encrypted package file."
     
  10. imgumby

    imgumby

    Joined:
    Nov 26, 2015
    Posts:
    122
    Well at least not just me then.;)
     
  11. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @AbichusGames,

    We are almost ready with DoozyUI version 2.8.1. It will get released next week and we're bringing back support for TextMeshPro. That should fix your issue and allow you to use TextMeshPro with DoozyUI without any more issues.

    We are also releasing the UIToggle component along with some new features.

    Right now we are testing the new features, doing stress and upgrade tests and making sure the system is stable and without any memory leaks.

    If, after you upgrade to version 2.8.1, you'll have the same issues then please let us know so that we may take a better look at your particular use case scenario.

    Thank you for your support!
     
  12. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Zanderfax,

    You want a system that captures the last button that was pressed so that you can do something with it?
    Asking so that we know exactly what you are looking for.
     
  13. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @imgumby and @JasonVSG,

    We are aware of this issue and it's an Asset Store error.
    We've reached out to their team, with an email, and we wait for them to help us out on this one.

    This probably happened on Friday when we submitted version 2.8.0p8f1 right after 2.8.0p8. We're confident that this issue will get sorted out shortly.

    Thank you for your support!
     
    rayBLAST-R likes this.
  14. kadzhadoom

    kadzhadoom

    Joined:
    Apr 16, 2017
    Posts:
    2
    Good to know, as I am seeing this error, as well.
     
  15. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi All,

    We talked to the Unity Asset Store team and they asked us to upload the package again to see if this fixes the download/upload problem. This new package is actually version number 2.8.0p8f1 changed to 2.8.0p8f2 and nothing else.

    We'll keep you updated on this as soon as we have news.

    Thank you for understanding.
     
  16. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi All,

    Version 2.8.0p8f2 is now live and you should be able to update/download it without any issues.

    Thank you!
     
    Last edited: Aug 13, 2017
    kadzhadoom likes this.
  17. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    DoozyUI 2.8.1 is almost ready. Stay tuned...
    DoozyUI 2.8.1 - UIToggle Teaser.PNG
     
    jprocha101 likes this.
  18. Nowlz

    Nowlz

    Joined:
    Nov 18, 2016
    Posts:
    55
    struggling with the upgrade from 2.7 to 2.8.0p8f2

    The automatic upgrade doesn't start after I import the asset. Instead I get a series of errors beginning -

    Code (CSharp):
    1. Assets/DoozyUI/Scripts/Helpers/UpdateSortingLayerName.cs(11,23): error CS0117: `DoozyUI.UIManager' does not contain a definition for `UpdateCanvases'
     
  19. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Nowlz,

    The system does not need that file from version 2.8 and up.

    Go to Tools > DoozyUI > Upgrade Manager > [Clean DoozyUI Files]
    This should delete all the unnecessary files.

    Did this do the trick?
     
  20. kadzhadoom

    kadzhadoom

    Joined:
    Apr 16, 2017
    Posts:
    2
    Hi @allemaar,

    Download, import, and upgrade of the 2.8.0p8f2 package (into an empty project) works great:

    [DoozyUI] [UpgradeManager] Finished automated upgrade...

    Thanks for getting things ironed out with the AS!
     
    AlexMares likes this.
  21. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    pageAboutDoozyUIVersion.png
    Submitted for review!
    PLEASE BACKUP PROJECTS BEFORE UPDATING!!!
    Please let us know if you find any bugs (or solutions) so that we can improve the asset as fast as possible.

    ------
    Version 2.8.1
    ------
    New Component: UIToggle is now available. You use it just like a Toggle component, with some added flair. Its behaviour is simiar to the UIButton.

    New Feature: Control Panel - Editor Settings - UIToggle. You can now set default (reset) settings for the UIToggle component.
    New Feature: UIElement now has an autoHide option. This allows the UIElement to automatically hide itself after being shown.
    New Feature: UICanvas now has a dontDestroyOnLoad option. This makes the UICanvas gameObject not get destroyed automatically when loading a new scene.
    New Feature: SceneLoader usage can be disabled. Until this version, SceneLoader was loaded, into the active scene, by the UIMananger regardless if it was used or not. Now there is a setting in the ControlPanel that disables the SceneLoader from being atutomatically added to the scene.
    New Feature: Added support for TextMeshPro (free version)

    Change: UIButton's Label text color has been changed to a darker variant.
    Change: If using TextMeshPro - UIButton's Label will have a TextMeshProUGUI component attached instead of a Text component.
    Change: If using TextMeshPro - UIToggle's Label will have a TextMeshProUGUI component attached instead of a Text component.
    Change: If using TextMeshPro - UINotification's Title and Message will use TextMeshProUGUI components instead of Text components.

    Fix: If the SceneLoader usage is enabled and it gets created at runtime, it will not be automatically selected in the Inspector.​
     
    Last edited: Aug 14, 2017
  22. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @allemaar Could I ask how we change the UI Sorting Layer on UIButton objects? Like how we'd do it on UIElements?
     
  23. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Ben-BearFish,

    That is very easy. We don't do anything to the native Unity UI framework, so just use native Unity components and its recommended workflow.

    Because you probably want to manually change the sorting order of a button (or any other UI component for that matter), all you have to do is add a Canvas component (and override sorting, setting your desired sorting layer and order in layer). This will change the draw order. Now, because this is a button and you want it to capture clicks/taps, you also need to add a Graphic Raycaster component. Done.

    Step by step:
    1. Select your Button
    2. Add a Canvas component (native component)
    3. Override sorting for that Canvas
    4. Set desired sorting layer
    5. Set desired order in layer
    6. Add a Graphic Raycaster component (native component)
    7. Done

    If it were an Image or anything else that did not require click/tap capture, the Graphic Raycaster would not have been necessary.

    Did this help you out?
     
  24. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @allemaar This helps out in understanding how to implement it. Though I have reservations about having so many Graphic Raycaster and Canvas components in the scene. Correct me if I'm wrong, but I feel as though Canvas components and Graphic Raycasters are expensive with Unity's UI (in terms of optimizations), and it's better to have less canvases and raycasters to save draw calls, raycast checks, and frames?
     
  25. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Hi @allemaar ,

    "Auto selected button after show" of UIElement doesn't work for me. I have a few UIEs in my demo scene, they're panels with buttons, when I switch between UIEs, their first selected button is not highlighted correctly (neither uGUI nor DUI behaviors).

    It might be related to `UIElement.iSetSelectedGameObject()` and I have seen people discussed this issue of uGUI in other posts, tried their fix but no luck. So I guess we need a DUI version fix?

    http://answers.unity3d.com/questions/1159573/eventsystemsetselectedgameobject-doesnt-highlight.html
    http://answers.unity3d.com/questions/1096174/eventsystemsetselectedgameobject-does-not-highligh.html
     
  26. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    @Ben-BearFish

    There are several things that need to be taken into account when building your UI.
    If you want to learn more about how Unity's native UI system works, read on.

    UI BATCHING IN UNITY


    The main thing the Canvas does is to batch elements together. Batching means that it takes all the same elements, that have the same texture and material, and tries to put them in 1 draw call if it can. If it can't do that, it creates more draw calls and the more you have, the less efficient your UI design is.

    What does 'the same texture' / 'single texture' mean?
    Images use sprites that, by default, get packed into an atlas. That atlas is that single texture. So if the sprites used in your UI are on the same texture, and you did not override the material, you get 1 draw call (this is very important for optimization purposes).

    Text, on the other hand, is always in a different atlas. So if you have an Image followed by Text , you'll have 2 draw calls as they cannot be batched together.

    The batching system used by the UI has been thredded since version 5.2. This means that all the sorting code has been split into quick little threads that execute when there is time (so that they don't block the main thread).

    BATCHING - Overview

    1. GenerateRendableUIInstructions
    - takes all the Canvas Renderers data and copies it (because of threading).
    - figures out what instruction can actually be rendered;
    ----- is the alpha zero? (if yes, it is not added to the render as there is nothing to render)
    ----- is the size zero? (if yes, it is not added to the render as there is nothing to render)
    ----- has it been called by a RectMask2D? (is it outside of the culling area? - if yes, then it gets dropped)

    2. SortForBatchingJob
    - here all the batching stuff gets sorted into 'buckets'
    - once the order has been calculated it starts preparing for the batch jobs

    3. PrepareBatchesJob
    - this is actually preparing the rendable UI instructions to be passed to the graphics device for a little bit of processing

    4. UIGeometryJob
    - this transforms the vertices, modifies colors and applies lighting (if necessary)

    Once the UIGeometryJob finished, one of two things happen:
    1. If it's an Overlay canvas, the canvas renders the data directly to the graphics card itself (at the end of the frame, after everything else has been drawn)
    2. The Screen Space Camera and World Space canvases, insert themselves into the camera's render queue and gets further processed to be sorted with all the other world geometry that you have.

    HINT: If you don't need lighting, nor particle systems inside the UI, the Overlay canvas is the fastest option, as you don't have to wait on anything else. Unity is not doing any extra processing on it.

    BATCHING - Sorting Buckets
    Each grid 'square' is considered a bucket. When processing the sorting and going through all the rendable instructions, they system needs to figure out in how many buckets an Image (for example) can be put into. If an Image spans on 3x4 grid squares, it will be split into 12 different buckets.
    If there are several 'items' in the same bucket, extra processing occurs. The depth is calculated (sorting order).

    BATCHING - Common Issues
    Elements are not aligned
    - look at the z axis; you should use the same z; not having the same alignment, causes a break in the batch because it messes up the draw order and significantly increases your batch count
    - this can be seen in the draw call count (or the debugger); so this is a huge optimization that you need to be aware of
    - easy solution to this -> select all your UI and put it on z = 0 or any other value, just have your entire UI on the same z !!! -> Done

    Sprites are not sharing the same texture
    - so they are not batching together
    - check that your sprite atlases are turned on
    - check that you specified the same packing tag for all of your sprites used in the UI
    - make sure you have the same settings for the sprites (for example one can be on mip maps and the other is not); if the properties do not match, you'll get different atlases; so just check your import settings (for your ui graphics) and make them all the same so that they can be batched together


    About the canvases, you should know that when a child of a canvas has its properties changed (for example a
    RectTransform's values, or maybe an Image's color), that entire canvas needs to be 'refreshed'. So if you use one big canvas for your entire UI then you are doing it wrong. Every time you press a button, or change anything to it, your entire UI will get refreshed. Imagine having an animated sprite inside that canvas; that would trigger a constant refresh for your entire UI. So split your UI into different canvases and increase your UI's performance.

    The Graphic Raycaster works hand in hand with the Canvas component. It is used to capture clicks/touches for the UI. If you have several stacked Graphic Raycasters, only the top one will get triggered. It is quite efficient, if you use override sorting, because if one Graphic Raycaster 'is triggered', all the others are not checked (ignored) on that frame. This is useful especially for buttons, or to block clicks/touches on the UI.

    We can talk a lot about Unity's UI framework, as we have studied it extensively. We hope that by reading this quick introduction, on how the batching is done inside Unity, you will have a better understanding of how to structure your UI in a more efficient manner.

    Should you have any questions, fire away! :)
     
    Last edited: Aug 16, 2017
    zalogic and jprocha101 like this.
  27. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @zhuchun,

    Thank you for telling us about this. We'll look into it.
    We hope that the don't destroy on load option for the UICanvas was to your satisfaction (added in version 2.8.1).
     
    zhuchun likes this.
  28. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
  29. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Thank you very much!
     
  30. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Thanks for the information. I did not know about the child rectransforms forcing the entire canvas to update. That gives me a better understanding of how the UI works.

    Could I ask about two possible feature requests? The first is the ability to move the UnityEvents in your inspector as a Reorderable List. Similar to how it is done with this plugin.

    The second is more from a gameobject standpoint. Would it be possible to access the child object component information from the Doozy Parent? So for example, on the UIButton inspector, I can change the child gameobject named 'Background' Image component right there on the UIButton.
     
  31. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @allemaar Also, could I ask how to hide a button on click? There doesn't seem to be an example how to do that in the videos. I set the OnClick event to GameObject.SetActive(false), but then the editor says there are errors:
    Which I assume is because UIButton is using coroutines for the animations.
     
  32. Santol78

    Santol78

    Joined:
    Apr 26, 2017
    Posts:
    1
    Just recently purchased doozyUI a few weeks back and trying to get menues to work with a controller/keyboard. buttons work fine when clicking them with mouse. the correct actions get called but cannot get the navigation to work. any lead to maybe the correct tutorial or documentation on how to do this would be helpful as im not seeing it in documentation...
     
  33. benzsuankularb

    benzsuankularb

    Joined:
    Apr 10, 2013
    Posts:
    132
    @allemaar
    UIElement's 'Hide @ Start' and 'auto hide after a x seconds delay' not working.
    And many crash on 2017.02b04 maybe not Doozy false.
     
  34. ChristoMaker

    ChristoMaker

    Joined:
    May 7, 2017
    Posts:
    6
    @allemaar
    Recently purchased doozyUI 2.8.1 - because it seems to be a good plugin- , in order to make a 3d configurator,
    and trying to have together (on the same main screen in the MasterCanvas) :
    - UIElements for options (buttons etc...) (in screen space - camera or overlay ?)
    - and the 3D product in order to turn around it (inspector/canvas/worldspace ?)
    My goal is to make an animation with UIElement to appear and disappear on the main screen. When this UIElement is set in inspector/canvas/screenSpace Overlay, i can't move it outside on the right of the main screen for example.
    Should have I a one camera for UIElements ? I have of course already one camera for the 3D product.
    I have no knowledge for code that's why I'm using Playmaker too.
    How to do it ? Could you help me ? Thank you.
     
    Last edited: Aug 20, 2017
  35. ChristoMaker

    ChristoMaker

    Joined:
    May 7, 2017
    Posts:
    6
    Sorry,
    I think I found a reply on this forum with this file : "Basic Camera Setup.png".
    I will tell you next if it works according to my needs.
    Thank you,
    Chris
     
    AlexMares likes this.
  36. ChristoMaker

    ChristoMaker

    Joined:
    May 7, 2017
    Posts:
    6
    It works very well : it was just a problem of camera settings. Thank you
     
    AlexMares likes this.
  37. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Ben-BearFish,

    The first is the ability to move the UnityEvents in your inspector as a Reorderable List.
    We assume you are referring to the game events lists. And yes, we can implement such a feature.

    The second is more from a gameobject standpoint. Would it be possible to access the child object component information from the Doozy Parent? So for example, on the UIButton inspector, I can change the child gameobject named 'Background' Image component right there on the UIButton.
    You want to be able to edit the Image component of the Background gameObject, right on the UIButton component?
     
  38. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Ben-BearFish,

    You are correct, you cannot and should not disable it.
    You can either have it under an UIElement and hide it with that, or you can write a script to set it's X and Y scale to zero.
     
  39. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Santol78,

    We have already recorded a video about the Navigation at it is in editing right now. It will be posted this week on our YouTube channel.
     
  40. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    got two features request: an editor tool that swap all text font in the selected parent childs
    a window where you can drag and drop user made prefab of things like window/button etc
     
  41. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @benzsuankularb,

    UIElement's 'Hide @ Start' and 'auto hide after a x seconds delay' not working.
    We need a bit more info about your setup in order to see where the problem came from. Check that the UIElement has an elementCategroy, an elementName, at least one IN animation and one OUT animation enabled.

    And many crash on 2017.02b04 maybe not Doozy false.
    We are not supporting beta versions of Unity as they get changed quite a lot up to their release.
    Also, we need a bit more info about how you got the crashes, in order to be able to diagnose the problem.
     
  42. ChristoMaker

    ChristoMaker

    Joined:
    May 7, 2017
    Posts:
    6
    onclickbutton+playmaker-doozy.JPG
    Hi @allemaar,
    I'm trying to activate with a first button + playmaker a gameobject (to set it visible),
    this game object is not activated in the inspector (hiden)
    Questions : Can I use inside the MasterCanvas/UIE/Button or Doozy UIButton for Playmaker Actions ?
    In attached file there is my capture screen of playmaker editor for button (simple unity UI button and not doozy UIButton)
    This editor is reached by the edit button of the playmaker FSM (script) of the Button.
    I have a PlaymakerEventdispatcher for both gameevents and button clicks, It is localised in the root of the hierarchy.
    It doesn't work.
    Is playmaker inside doozy only for animations and sounds ?
    Thank you,
    Christo
     
  43. benzsuankularb

    benzsuankularb

    Joined:
    Apr 10, 2013
    Posts:
    132
    @allemaar
    Yeah, I've already make sure it's have at least one IN animation and one OUT animation enabled. both load at runtime and load preset to inspector.
    Maybe also the issue with 2017.2.
    You can manipulate crashes easily by open elementDatabase via UIElement inspectors.

    About UIButton, How to hold the animation when pointer down and release animation when pointer up like general game's buttons?
     
    Last edited: Aug 21, 2017
  44. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hi,

    I'm using the latest DoozyUI and Unity 2017.1.

    I have a UIElement with a child gameobject with a Vertical Layout Group component on it and some child UIButtons under that. When I animate the show or hide on the UIElement it causes all the buttons to move on top of each other instead of staying as they're set up with the Vertical Layout Group component.
     
  45. ChristoMaker

    ChristoMaker

    Joined:
    May 7, 2017
    Posts:
    6
    @allemaar,
    I finally found an answer in the documentation.
    Thank you
     
    AlexMares likes this.
  46. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @allemaar For the first point, I meant for the Events. It would be nice if these UnityEvents were Reorderable. I believe this free plugin does it if it helps for reference. But it'd be nice to have that built into DoozyUI.
    2017-08-21 .png

    For the second point, yes, want to be able to edit the Image component of the Background gameObject, right on the UIButton component. Thanks.
     
  47. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Damien-Delmarle,

    an editor tool that swap all text font in the selected parent childs
    That's not a bad idea and it's quite easy to implement. I'll add it to the roadmap.

    a window where you can drag and drop user made prefab of things like window/button etc
    For this we already have a flexible system in mind and it will get added as soon as we start releasing complex components (like loading bars, list views and so on...). This is a very important feature that has to be implemented by version 3.0 as the UITemplates will need an easy to use system.
     
    Tiny-Tree likes this.
  48. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @Rousselot,

    Can I use inside the MasterCanvas/UIE/Button or Doozy UIButton for Playmaker Actions ?
    It depends how you want to use it. First of all you should understand how PlaymakerEventDispatcher works. You attach this component to a FSM and set it to dispatch game events and/or button names.
    This will send (for your particular case) the UIButton buttonName of all the clicked UIButtons.
    In order to capture them, you create FSM Events (with the exact button name).
    You do that by opening your FSM, going to the Events tab and adding a new event named 'MyButton'.
    Then you create an UIButton and set its buttonName to 'MyButton' (the category does not matter for the UIButton as it serves only for sorting purposes).
    Now, instead of having the 'UGUI / ON CLICK' event, you set 'MyButton' as your FSM state event. This, in turn, will make the FSM react to your button press.

    Bear in mind that you should not disable UIButtons or UIElements yourself as that would make the system useless for you. DoozyUI uses a lot of timed coroutines and settings in order to work as intended and with a minimum memory footprint.

    Is playmaker inside doozy only for animations and sounds ?
    The system is way more flexible than animations and sounds, but you need to understand how to use it first.

    The idea behind the PlaymakerEventDispatcher is for DoozyUI to be able to send a game event or a button name (button click) to any FSM. This should give you a lot of options to work with the system as you have a lot of flexibility design wise.

    Did this help you out?
     
  49. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @benzsuankularb,

    Yeah, I've already make sure it's have at least one IN animation and one OUT animation enabled. both load at runtime and load preset to inspector.
    Does your UIElement have an elementCategory and an elementName set?
    What version of DoozyUI are you running?
    Do you add the UIManager to the scene, or does it get added automatically?

    Maybe also the issue with 2017.2.
    You can manipulate crashes easily by open elementDatabase via UIElement inspectors.

    What is your OS? (WIN or MAC)
    Is your project a new project or is it an older project (started with a version prior to 2.8) and upgraded to 2.8?

    About UIButton, How to hold the animation when pointer down and release animation when pointer up like general game's buttons?
    This feature requires the UIButton to use a normal animation instead of a punch animation. For now only punch animations are available, but we do have normal animations planned for the UIButton, on our development roadmap. So, to answer your question, normal animations have not been implemented yet. We cannot give you an exact date when that will happen because there are other features (with higher priority) that need to be implemented and tested, but we can confirm that it will get implemented by DoozyUI version 2.9.0. This will be probably in the next 2 months.
     
  50. AlexMares

    AlexMares

    Joined:
    Mar 4, 2015
    Posts:
    498
    Hi @derkoi,

    The bad news is that the layout group (horizontal, vertical and grid) does not do a good job when recalculating the sizes at runtime (Unity does not refresh the layout).
    The good news is that we know how to work around this. Just parent the UIButton to another gameObject and it will work.

    [Bad Setup]
    GridLayout or VerticalLayout or HorizontalLayout
    --UIButton 1
    --UIButton 2
    --UIButton 3

    The above hierarchy setup stacks all the buttons one over the other. This happens because we animate them and Unity does not refresh the layout.

    [Working Setup]
    GridLayout or VerticalLayout or HorizontalLayout
    --ButtonContainer 1
    ----UIButton 1
    --ButtonContainer 2
    ----UIButton 2
    --ButtonContainer 3
    ----UIButton 3

    So the working setup would be GridLayout > ButtonContainer > UIButton
    instead of the bad setup GridLayout > UIButton.
    By animating the UIButton under another gameObject seems to get the layout to be calculated properly.
    We'll make a video about it as well.

    Did this help you out?
     
    Nowlz and derkoi like this.