Tree-like visual list/object representation in editor/inspector

Hello,
I am trying to figure out how to make a visual tree-like structure accessible from the inspector.
Let’s say I have a bunch of objects. Each object has an index and a pointer to another object. What I am trying to make is some kind of window that will be displaying each object along with its parent and children. I am not very familiar with editor scripting, and I failed to find anything that would allow me to create something even remotely similar. Any ideas ?
Thanks!

3330624--259592--Untitled.png

I don’t think there is any built-in editor thing to display a generic ad-hoc tree, but there might be some asset store packages to help you do it easier, but I’m not familiar enough with what’s available.

You can do it all with native Editor scripting, but there are actually two problems here:

  1. translating the data graph you have into a visual-spatial representation, ie. where does each node go, how big it is, how are the wires routed, etc. This could be naively done, but then it could get messy quickly.

  2. translating that “rendered location of all the things” into GUI drawcalls to pump into the editor script and make it appear.

The first part is a problem that you can make as easy or as hard as you like. The second part is simply a matter of choosing API calls from the UnityEditor namespace that do what you want visually.

The open source Node Editor Framework will give you a head start on #2.