Search Unity

Assets Delight LIVE UI editor sneak peek :)

Discussion in 'Works In Progress - Archive' started by patrik-org, May 5, 2020.

  1. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Last edited: May 26, 2020
    SlimeProphet and Paxew like this.
  2. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Website updated with new tutorials and API docs.
     
  3. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    (excerpt from on-demand loading guide)

    On-Demand Loading

    Introduction

    On-demand loading is a way to optimize memory usage and the initial load time of your scenes by only loading certain views and their assets when they are displayed. On-demand loading in Delight is simple and transparent.


    LoadMode=”Manual”

    By setting LoadMode=”Manual” on a view in XML you tell the framework that the view isn’t to be loaded until explicitly requested. The following example shows how a view is loaded/unloaded when the user clicks on a button:

    MyView.xml
    MyView.cs

    Code (CSharp):
    1.  
    2. namespace Delight
    3. {
    4.    public partial class MyView
    5.    {
    6.        public async void ToggleBigView()
    7.        {
    8.            if (!BigView.IsLoaded)
    9.            {
    10.                await BigView.LoadAsync();
    11.            }
    12.            else
    13.            {
    14.                BigView.Unload();
    15.            }
    16.        }
    17.    }
    18. }
    19.  
    We check IsLoaded, which is a boolean indicating if the view has been loaded, to either load the view by calling LoadAsync() (if you want to do it synchronously you can call Load() instead), or unload the view by calling Unload().

    Asset Bundles

    Delight greatly simplifies the use of asset bundles by making the process of loading and unloading them transparent. All assets (Sprites, Fonts, Materials, etc) that are referenced by views will automatically be loaded from their asset bundles on-demand. To create an asset bundle you simply need to make sure the assets reside in an a certain folder. See the Asset Management tutorial for more details.
     
    Last edited: May 8, 2020
  4. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Designer auto-complete taking shape.
     
  5. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    Looks really cool, I like how it uses markup. Did you use something called recursive decent parsing to make it?
     
  6. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Not familiar with the term, but the parser uses recursion to parse each element in the XML :).
     
  7. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Designer now features preview thumbnails for assets, and tooltips.




     
  8. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Added new view: Expander

     
  9. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Using the designer to design the designer that designs the designer.

     
  10. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    New feature added: Paged lists

     
    Paxew likes this.
  11. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    johaswe likes this.
  12. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Showing off new feature: inline code. It's now possible to insert C# code directly into the XML in bindings and click handlers through the '$' prefix:



    Inline code in click handler that increases click counter:
    <Button Click="Click me" Click="$ ++ClickCount" />


    Inline code in binding, calls Math.Pow() with click counter as parameter:
    <Label Text="$ Math.Pow({ClickCount}, 2).ToString()" />
     
    Last edited: Aug 9, 2020
  13. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Added a simple Navigator view.



    Code (CSharp):
    1.  
    2.   <Navigator>
    3.     <!-- page '/' -->
    4.     <Region Navigator.Path="/">
    5.       <Label Text="/" />
    6.     </Region>
    7.  
    8.     <!-- page '/test' -->
    9.     <Region Navigator.Path="/test">
    10.       <Label Text="/test" />  
    11.     </Region>
    12.   </Navigator>
    13.  
    14.   <!-- buttons to open pages and navigate back -->
    15.   <Group Spacing="5" Alignment="TopLeft" Orientation="Horizontal" Offset="20,0,0,0">
    16.     <Button Text="Open '/'" Click="$ Navigator.Push('/')" />
    17.     <Button Text="Open '/test'" Click="$ Navigator.Push('/test')" />
    18.     <Button Text="Back" Click="$ Navigator.Pop()" />
    19.   </Group>
    20.  
     
  14. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100
    Navigator view now supports custom transition animations:

     
  15. patrik-org

    patrik-org

    Joined:
    Sep 10, 2012
    Posts:
    100