Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

[RELEASED] UI Table

Discussion in 'Assets and Asset Store' started by bourriquet, Mar 14, 2019.

  1. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    66
    An insanely easy Table Layout for Unity UI



    Asset Store Link

    Documentation
    Simple
    I uses reflection so you don't have to code anything. Just select your collection, the properties to display, and here you are.
    You can now customize the table all you want.

    Integrated
    Unity UI Table only uses and organizes Unity UI elements, so it's consistent and easy to integrate with the rest of your UI.

    Customizable

    Many Options:
    • Sortable Columns
    • Selectable Rows
    • Add/Delete Row Buttons
    • Update at Runtime or Save Performances
    • Many More...

    Feedback & feature suggestions welcome!








     
  2. minhplhl

    minhplhl

    Joined:
    Sep 11, 2017
    Posts:
    4
    upload_2019-3-22_11-20-34.png
    I try to run the example scene and this error appear when i press play button. Here is this error line.

    upload_2019-3-22_11-21-40.png
    this is the whole picture
     

    Attached Files:

  3. minhplhl

    minhplhl

    Joined:
    Sep 11, 2017
    Posts:
    4
    I can change the table data at runtime in code ??
     
  4. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    66
    Hi @minhplhl
    Yes, you can change the data at runtime. Enable the "Update Content at Runtime" option in the Performance section of the Table if you want the table to keep up-to-date.
    About your error, I see what causes it. Will fix it now. You can still go on, right? This error doesn't affect the functioning.
    Thanks for your feedback.
     
  5. linojon

    linojon

    Joined:
    Aug 25, 2014
    Posts:
    62
    hello, i've attached my component's collection List in inspector and defined the columns i want. I checked the At Runtime: Update: Cell Content. Then at runtime i populate the list, and call table.UpdateContent() but the data rows are never generated, just the header row. In the debugger, in Table.cs the targetCollection.Collection.Count is always 0. ?? I also tried calling SetDirty() before UpdateContent.
     
  6. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    66
    Hi @linojon
    You don't need to call UpdateContent (only useful when Update Cell Content option is off) or SetDirty. It normally just updates automatically if you set the option.
    What version of Unity do you use?
    Do you have any error in your console?
    Does it work when you add elements to the list in the inspector in edit mode?
    Is it possible to send me the project with the issue (or a stripped down version of course). You can email me with the mail button here: https://assetstore.unity.com/publishers/34298
     
  7. linojon

    linojon

    Joined:
    Aug 25, 2014
    Posts:
    62
    Unity 2018.3.7f1. No errors on the console.
    hi, i understand. In this case I dont need it to update automatically, its just a text panel that includes a table of data, not interactive, When the panel is enabled, i set its text and table content. I read the data from an external source at runtime Start so it doesnt make sense to add it via the inspector. In fact, the List isnt allocated (collection = new List<Myclass>()) until runtime, maybe this is the problem?
     
  8. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    66
    @linojon I see. The table loses the connection to the list if you reallocate it after the initialization.
    Can you call the constructor in the declaration?
    Anyway I should be able to ship a fix by tomorrow.
     
  9. linojon

    linojon

    Joined:
    Aug 25, 2014
    Posts:
    62
    that did it, thanks! i new call the constructor in the declaration and use .Clear() when i want to refresh it. Works :)
     
  10. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    66
    @linojon Great!
    I will handle this case in the next release.
    Thanks for letting me know.
     
  11. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    66
    The new version is live and handles this situation.
    Thanks again.