Search Unity

Selecting multiple assets using a TreeView

Discussion in 'Immediate Mode GUI (IMGUI)' started by amirblum, Dec 5, 2017.

  1. amirblum

    amirblum

    Joined:
    Jan 24, 2014
    Posts:
    14
    Hi guys, I'm writing a simple editor extension that is supposed to allow a user to select assets from the project and perform an action on them. The functionality I am struggling to achieve is exactly like the window for exporting packages, under Assets->Export Package... seen below:

    Built-in Package Exporter
    Screen Shot 2017-12-05 at 21.20.34.png

    So far I have implemented a TreeView class that builds itself by traveling the filesystem starting at "Assets". I've customized the RowGUI to show a toggle to the left of the name and it works well, as can be seen here:

    My implementation
    Screen Shot 2017-12-05 at 21.20.41.png

    That being said, there is a bunch more functionality I would like, for example thumbnails, selecting the entire folder contents when toggling a folder, showing a toggle with a minus in it when a folder is partially selected (similar to the "ExampleAssets" folder in the first image), etc.

    Before I continue implementing all these features which already exist, is there any way to simply present the aforementioned TreeView which is already in the editor for the purpose of exporting packages? I found no way to show that dialogue but it would be immensely helpful.

    Even a tree view with toggles implementation that I can extend would be useful.

    If not, then I'll post my work when I'm done for future generations as this should be pretty elementary in Unity...

    Thanks!
     
  2. RaeiRaei

    RaeiRaei

    Joined:
    Apr 7, 2016
    Posts:
    1
    Future generation signing in :)

    Did you finish your work?

    Thanks in advance