Search Unity

LazyLayout : Easy to use layout manager/switcher for Unity-GUI (No longer supported)

Discussion in 'Assets and Asset Store' started by LightYarn, May 7, 2015.

  1. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77


    Price-Update: Now only 6$!

    LazyLayout is a easy to use managing and switching tool for GUI-Layouts! It handles all important elements of Unity's own GUI-System "UGUI".

    ASSET STORE LINK: https://www.assetstore.unity3d.com/en/#!/content/36544

    You can easily prepare multiple layouts for different screen sizes and aspect ratios and switch between them as you wish. It takes only 4 easy Steps:
    1. Prepare your Layout as usual, add UI-Objects, move them around, etc. until you are finished
    2. Hit the save Button
    3. Start with a new Layout
    4. You are ready to go! Switch, Update, Load the different Layouts

    LazyLayout works inside the Unity Editor as well as during the runtime of your game.


    This custom Inspector is your main HUB while working with LazyLayout. Here you can save layouts, update or delete them and change to already saved ones.

    FEATURES:
    • Manage all important Unity-UI-Elements you need (RectTransforms, Images/RawImages, Texts, Buttons, Toggles, Sliders, Scrollbars, ScrollRects, InputFields, Vertical- ,Horizontal- and Grid-Layout-Groups, LayoutElements, Content- and AspectRatio-Fitters, Shadows and Outlines)
    • Switch between different Layouts on-the-fly inside the Unity-Editor for a faster workflow!
    • Work with the same objects for different layouts -> No need to create the same GUI-Elements over and over again!
    • Even "layout-unique" objects are supported! Maybe you want to see a certain image only on smartphones but not on tablets => No problem!
    • And even more.....and more to come!

    Especially if you are developing for mobile platforms it is hard to support all the different screen sizes and aspect ratios. LazyLayout can help you with that! :)

    Video-Overview


    (Pleaese excuse my English everyone, since I'm not a native speaker)


    LazyLayout will be in the Asset Store soon. It would be great if you guys would give me some feedback, ideas or other comments for my plugin.
    Thank you and see you soon! :)
     
    Last edited: Aug 26, 2016
  2. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    A video would be nice to see this in action!
     
  3. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    You are right. I made a quick overview video :


    Please excuse my English everyone, since I'm not a native speaker.
     
    mimminito likes this.
  4. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    It looks good! Similar concept to something I am working on currently. Do you have any documentation for this? And how are you saving the data for each layout?
     
  5. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Thank you! :)
    Saving all the data was not quite as easy as I thought in the beginning. Unity only references to the same object, even if you create a new one (image, text or button for example). I had to think of my own solution which took a while until it worked :-/

    Documentation will be included in the package once the plugin is in the Asset Store :)
     
  6. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thanks for the info! One last question. If I was to use this, how does the system work out which layout to use at runtime? Is it based on aspect ratio, and it finds the closest aspect ratio it can and uses that layout?
     
  7. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    LazyLayout is not only based on the device aspect ratio but handles the current physical screen size too. In the past I’ve noticed that relying only on aspect ratios you are getting problems especially on smartphones, or if you are developing a game for more than one platform.

    So in short: LazyLayout works with both aspect ratio and the current screen size. At runtime these values are determined and used to specify which layout should be used.
     
    mimminito likes this.
  8. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Sounds like a great solution! Thank you, I look forward to the release.
     
    LightYarn likes this.
  9. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Any idea when this will be released? This is definitely something we would like to use at work!
     
  10. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    No, not exactly. The plugin is currently reviewed by Unity which takes 5 work days on the average. But within a week it should be released :)
     
    mimminito likes this.
  11. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Hey guys! =)
    Unfortunately LazyLayout got declined today because I made a stupid mistake with the documentations file format. I will resubmit it as soon as possible and will let you guys know when its finally there.

    Until now, thank you very much for your interest! :)
     
    mimminito likes this.
  12. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Update!

    I am very sorry for the delay, it seems lazy layout takes more time to review than I thought it would. Unfortunately it got rejected again today...because of two little warning-messages :-(
    I also didn't know that the asset store requirements for coding-plugins are so strict. But I resubmitted it again and all I can do now is thank you guys once again for your patience and your interest!
     
    mimminito likes this.
  13. ctknoxville

    ctknoxville

    Joined:
    Oct 1, 2013
    Posts:
    32
    Hoping it gets approved. Looks interesting.
     
    LightYarn likes this.
  14. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Very keen to get my hands on this. We have some big projects coming up which need of a solution such as this.
     
    LightYarn likes this.
  15. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    zyzyx and mimminito like this.
  16. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Awesome! Great news :) Is there documentation online at all or just inside the package?
     
  17. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Hi mimminito!
    Unfortunately I had to cut down the documentation because of the problems mention in post #11 :-/
    I had to reduce it to one ReadMe and one "Quick Start" file.

    Nevertheless these two documents should be all you need to start working with LazyLayout because the overall principal of the plugin is held very simple.
     
  18. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Ok no worries!
     
  19. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    We have just purchased at work, looking forward to using it and hopefully making our lives easier!
     
  20. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Could you please upload under using Unity 4.6? Its a pain having to download via Unity 5 and then importing backwards.
     
    LightYarn likes this.
  21. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    That's a good idea!
    I will try it and see if everything is working fine in Unity 4.6. If yes, this will be included in the next Update =)
     
  22. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Are there any plans to add in our own resolutions/aspect ratios? I was building something to manage this before your system came out, but if you are not going to add this in I will continue with my own product.
     
  23. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    This feature (together with some more) is definitely on my schedule! Unfortunately there are many things that consume my free-time right now and LazyLayout didn't get much attention in the past.....at least less than I hoped for :-/

    I need to manage my time and hopefully I will find some to bring LazyLayout a step further.
     
  24. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Ok thanks for the update.
     
  25. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I see a dll, not full source?
     
  26. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Here are some few little updates I managed to implement/change. Right now there are no custom ARs (they will come) but LazyLayout now supports almost every common AR on the market. In detail:
    • 3:2_Landscape and 3:2_Portrait AR are now supported (for old iPhone devices)
    • So currently supported ARs are 16:9(Land/Port), 4:3(Land/Port), 3:2(Land/Port) and in addition to this the "other" option still remains
    • Added an option to either make LazyLayout load in "Start" or a bit earlier in "Awake". This makes it much more suitable if you need to adjust the timing when your layouts are being loaded
    • I have to stay with the latest Unity build because they are constantly changing the UI system in more or less effecting ways. For example the checkbox for "Raycast Target" got implemented and LazyLayout might have to support these new or changed features.
    Now I am trying to focus on custom AspectRatios and when this is finished there will be an update to the plugin.

    @imtrobin
    Its mixed Some of the LazyLayout components exist in plain C# code and others are packed in a dll file
     
  27. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    so not full source?
     
  28. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thanks for the update. Could you explain how the "other" option actually works? Im a little confused here, does it basically trigger this option is none of the pre-defined ones are set?
    Also as other people have mentioned, making this open source would be greatly beneficial. For changes to the UI system, or supporting new components, unless you write a plugin system we cannot extend the functionality which is a shame.
     
    LightYarn likes this.
  29. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Yes, you got it quite right. The "other" option is basically a fallback for the user. Maybe if you want to have one specific layout that your UI can fall back to if the game is not running on any of the pre-defined ones.

    For example: You set up different UI-Layouts for any common aspect-ratio and maybe even for different device sizes. If you now want to have one layout that does work with odd aspect-ratios you could set the "other" flag.
    Every time LazyLayout recognizes an aspect-ratio that does not fit to the preset ones it will look for any fitting layout that has this option set to true.


    You (and every other person sharing the same thoughts about making this open-source) might be right.
    Right now I chose the DLL way because of several reason like keeping the folders clean from more than a few C# files, or causing errors because some files that are unrelated to the plugin might cause it to stop working. Its kind of a "nicer" end-user plugin if you have a tiny, tidy small plugin with no overload.

    But I understand the needs for small and quick adjustments. I will deliver all the C# files in a separate ZIP-File, or Unitypackage so users that are happy to include just a simple DLL rather than many source files can leave this untouched and the ones who want to adapt things can use the source files.
     
    mimminito likes this.
  30. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Fantastic. That would be perfect. Do you have a plan in place for when you could do this? As I have mentioned before I had to start developing my own system but if you are able to do the above, then I can hold fire on my own and start using yours instead!
     
    LightYarn likes this.
  31. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Thank you! =)

    I think I could manage to handle all this within a week or so. I nearly implemented the custom ARs and the rest should be no big thing. After that it will (unfortunately) take a bit time again, because the plugin has to be reviewed by Unity again until the update is completely there.

    I cant make promises but I'll try to accomplish these things as fast as I can.
     
    mimminito likes this.
  32. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thanks :)
     
  33. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Alright! :)

    On today's Sunday-Morning I managed to submit version 1.1 of LazyLayout! I hope it gets through the approval process quite fast and wont be rejected because I included a .zip file (which contains the source code)

    Here is a list of the changes I made:
    • Added support for 3:2 aspect ratio (e.g for old iPhone devices)
    • Added custom-aspect-ratio support. Now you can define your own aspect ratios!
    • Added option to load all layouts in "Awake" rather than "Start"
    • Added option to exclude all texts inside text-fields. (prevents possible issues with translation plugins)
    • The saved-layouts list can now be hidden/shown. This keeps the inspector shorter.
    • And of course: Source-Code now included!
     
    mimminito likes this.
  34. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    mimminito likes this.
  35. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Hey there. I am interested in this plugin, but its not clear from the video how this works at runtime?

    Does it automatically choose the correct layout you have made based on the devices orientation or is this something I would have to script my self?

    Cheers

    D
     
  36. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Hey David :)

    LazyLayout is designed for detecting the current aspect-ratio in the startup of the scene, because this value wont change if your change your phones orientation. It will only switch. For example 16:9 to 9:16 and so on.

    Changing at runtime (for example in "update" ) will be implemented in the next version, which will be release quite soon.
     
  37. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Hey @LightYarn Thanks for the info. I'd say changing on 'update' is an almost critical piece of functionality since its dealing with the change of orientation that is one of the mayor hurdles to responsive design- especially on mobile. So I'll be very excited to see this new version. How long are we talking, weeks, months? Do you want a beta tester?
     
  38. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    You are right on that.....its quite a crucial functionaltiy!

    I'll submit the update as soon as possible, but it might take up to 7-10 days until everything is ready and reviewed by Unity.
     
  39. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Hey everyone! I successfully implemented the "change layout at runtime" feature =)

    After some polishing I'll submit the update to Unity and then it will take several days until its apoved
     
  40. grimmy

    grimmy

    Joined:
    Feb 2, 2009
    Posts:
    409
    Hi, could you tell me what 'Min device size' actually means? Should I just use 6.5 inches everywhere? I presume not but I have no idea what to base my input on.


    Cheers
     
    Last edited: Mar 11, 2016
  41. grimmy

    grimmy

    Joined:
    Feb 2, 2009
    Posts:
    409
    I'm having difficulty deleting objects. When I do I just get an error when I try to switch layouts.. (I used the red delete button helper to perfom the deletion)

    --LAZYLAYOUT ERROR-- Could not find object for instanceID -15ebf591-7bb9-4703-8256-a8a43a5f13cf-
    UnityEngine.Debug:LogError(Object)
    LazyLayout.LayoutApplier:GetCorrentRectTransform(String)
    LazyLayout.LayoutApplier:CheckGOActive(LL_Layout, Int32)
    LazyLayout.LayoutApplier:ApplyLayout(Boolean)
    LazyLayoutController_Inspector:ApplySavedLayout(Int32) (at Assets/LazyLayout/Editor/LazyLayoutController_Inspector.cs:735)
    LazyLayoutController_Inspector:DisplayButtons(Int32) (at Assets/LazyLayout/Editor/LazyLayoutController_Inspector.cs:244)
    LazyLayoutController_Inspector:DisplaySavedLayouts() (at Assets/LazyLayout/Editor/LazyLayoutController_Inspector.cs:219)
    LazyLayoutController_Inspector:OnInspectorGUI() (at Assets/LazyLayout/Editor/LazyLayoutController_Inspector.cs:86)
    UnityEditor.DockArea:OnGUI()
     
  42. grimmy

    grimmy

    Joined:
    Feb 2, 2009
    Posts:
    409
    Eep..I also just tried to make an iOS build with Lazy Layout and got the following error:

    ArgumentException: The Assembly UnityEditor is referenced by LazyLayout ('Assets/LazyLayout/LazyLayout.dll'). But the dll is not allowed to be included or could not be found.
    UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:156)
    UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:162)
    UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:194)
    UnityEditor.HostView:OnGUI()

    Unity version 5.3.3f1
     
    Last edited: Mar 11, 2016
  43. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Hi Grimmy (Simon) ;)

    Right now I'm looking for the "Cant build, dll not allowed" problem (as we already spoke about via Email) but nevertheless, here are some answers to your previous questions. Maybe they will help other people with the same problems:

    (EDIT) Important: The "Cant build, dll now allowed " problem:
    I got this bug fixed and I will submit it to Unity as soon as possible so you will get it via the usual plugin updater inside Unity. Thank you for your patience.

    Minimum Device size:
    This gives you the option to specify at which device size (and above) one layout is chosen.
    Here is an example: Maybe you made a layout which fits to a 4:3 aspect ratio but also fits to a 3:2 aspect ratio (since these two are rather close). A 4:3 layout is usually made for big tablet screens but without a "min. device size" LazyLayout would now show the (big) 4:3 layout even on a small 3:2 iPhone 4. But with this option set up you can say "no, this 4:3 layout should only be applied if my device size is greater than 6 inches"
    Another example is that you could set up two different 16:9 layouts but the "bigger" one should only be visible on big 16:9 tablets with a dive size greater than 7 inches or so.

    Error "Could not find object for instanceID: xxxxxxx":
    This error usually has two causes
    First: A gameobject was deleted using the "del" key rather than using the LazyLayout-Helpers "Delete GameObject" Button. This leads into a nullPointerRef because internally LazyLayout does not reconize that the GO was deleted and still tries to find its ID when changing layouts. Right now it is planed to listen for the "del" key inside the Editor and automatically do everything needed.....but I could not quite figure this out until now.

    Second: You crated a new gameobject using the duplicate function (maybe with STRG+D). This will also duplicate the LazyLayout-Helper component and with it the ID of the old GO. You can do this, but please delete the LL-Helper component after duplicating an object an hit "update layout" on your LazyLayout-Controller Component. This will integrate the newly created GO in the Layout

    If anyone has some tips to listen for duplicate GO and delete GO Events inside the Editor: Please feel free to tell me :)
     
    Last edited: Mar 11, 2016
  44. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Here's a short update:

    • Version 1.2 of LazyLayout is now in review and should be processes in the next few days.
    • The next version is already in development .....aaaaand I think I managed to get rid of the annoying "duplicate" problem. Right now duplicating objects works great and doesn't mess up the ll_helper nor the saved layouts :)

    Thank you everyone for your interest!
     
  45. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,941
    Hey, are you actively developing it?
     
  46. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Hi John,

    unfortunately it seems that there is not much interest in my plugin :(
    According to this I had and have to manage my spare-time and spend more, on urgent and more important things.

    But: LazyLayout 1.2 is absolutely usable as described in this thread/readme/tutorial-video. Moreover I'm trying to continue the support and dev as much as I can according to the actual demand.
     
  47. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,941
    First problem is that your plugin doesnt appear in search. Just write Layout only and then search on asset store. I found it from some other person.
    Now coming back to question, i use constant physical size for my UIs, can i use it in this scenario?
     
  48. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    Hi John,

    thanks for your advice and sorry for my late response!
    Settings in the canvas scaler are not affected by lazy layout. So this wont be a problem.
     
  49. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77
    UPDATE
    New price! Get LazyLayout for 6$ now!​
     
  50. grimmy

    grimmy

    Joined:
    Feb 2, 2009
    Posts:
    409
    Does this mean its not supported anymore? I actually had to stop using it in the end because of way it saved stuff. I was having to do the same work again for each resolution....and the duplicate problem caused me no end of issues too :( Too bad because I think this had LOTS of potential to be really REALLy useful. :(