• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Jean-Fabre · Apr 12, 2011 at 01:19 PM · guieditortreewindow

How to build an editor window with a treeview widget?

Hi,

I would like to build an editor window with a treeview very much like the project view or Hierarchy view. Only that the content is arbitrary, it's not the gameObject in the scene nor the project content.

Is it possible? Can't find anything in the help on this.

Thanks for your help,

Jean

Comment
rhys_vdw

People who like this

1 Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image theylovegames · Oct 01, 2014 at 09:17 PM 0
Share

One thing I need to improve in my own solution is handle an unlimited number of items in the tree view and have the control handle paging without impacting performance.

4 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Bunny83 · Apr 12, 2011 at 01:48 PM

Well, there's is not ready-to-use tree view. Even if there is one it would be a pain to provide the containing data (due to immediate mode). But it's not impossible. You can create your own treeview. Just "some" labels/buttons/.... and you're done :D

Comment

People who like this

0 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jean-Fabre · Apr 13, 2011 at 06:17 AM 0
Share

Hi, I thought so too, Will roll my own, no problem. Tho I have a hard time believing that they also roll their own...

avatar image

Answer by tgraupmann · Jun 06, 2011 at 03:32 PM

The tree view control is available in the Asset Store link text.

Comment
Demigiant
Flickayy
Leslie-Young
rus89

People who like this

-4 Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tgraupmann · Jun 03, 2011 at 06:16 PM -1
Share

Here is a tree view control that will be available for Unity soon - link text

avatar image Demigiant · Jan 08, 2012 at 06:16 PM 0
Share

Doesn't work in editor windows, as Jean Fabre asked (and as I would've liked).

avatar image Demigiant · Jan 08, 2012 at 06:17 PM 0
Share

(though it's cool :-))

avatar image tgraupmann · Mar 26, 2012 at 05:49 PM 0
Share

Hey now. I included an example scene that shows the tree view works in game, in the scene view, in a custom panel, and in an inspector. The control has a custom inspector.

avatar image

Answer by Flickayy · May 18, 2014 at 01:53 AM

Sorry for the necro. But after trying to find a solution for my own needs I stumbled across this.

I believe you could achieve something similar to what you what, by manipulating the "EditorGUI.Foldout" function. You could create a function that makes nested foldouts as a workaround.

(Just for anyone else who stumbles across this like I did. Although it's not a copy&paste solution, it shouldn't be hard to implement.)

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by iwHiteRabbiT · Oct 01, 2014 at 10:53 AM

Hello,

I'm resurrecting this because I was recently looking for a solution too. Nevertheless, I really didn't find anything that matched my needs, so I made it myself and decided to sell it on the asset store.

You can find it under the name TreeView GUI.

I Hope this will meet your expectations.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Add an image/texture to a custom editorwindow 0 Answers

Animator Window Layout Problem 0 Answers

Replicate Timeline in Animation window 1 Answer

Add EditorUI elements when a button is pressed 0 Answers

Why my GUI.Window is at the wrong location in the Editor? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges