While working on a project that needed some sort of in-game editor for a while, I have developed a runtime Inspector and Hierarchy solution that works similar to Unity’s own Hierarchy and Inspector views.
The hierarchy costs 1 SetPass call and ~4 batches (assuming that Sprite Packing is enabled in Editor Settings)
The inspector costs 1 SetPass call and ~10 batches (assuming that Sprite Packing is enabled in Editor Settings)
Both panels are heavily optimized in terms of GC in order not to generate any unnecessary garbage. By default, both the inspector and the hierarchy are refreshed every frame to reflect any changes to their user interface immediately. This generates some garbage especially for the inspector as, most of the time, the inspected object has variables of value types. These variables are boxed when accessed via reflection and this boxing creates some unavoidable garbage. However, this process can be greatly optimized by increasing the Refresh Interval of the inspector and/or the hierarchy
Includes a built-in color picker and a reference picker:
Visual appearance of the inspector and the hierarchy can be tweaked by changing their Skin. There are two premade skins included in the Skins directory: LightSkin and DarkSkin. You can create your own skins using the Assets-Create-yasirkula-RuntimeInspector-UI Skin context menu
Although I have a problem: I use the default hierarchy prefab, but the hierarchy is empty when running in the player (android, win). In the editor it works fine. Can you tell me what to look for?
Using unity 2017.2.0f3
Edit:
tested with 2017.3.1f1 and it works
in 2017.3.0f1 added Mask instead of RectMask2D and it works
Maybe this helps. Have a nice day
While reproducing the issue on Unity 2017.2.0f3, I also noticed that some of my sprites were looking ugly in that version of Unity. In fact, it was the case for some of my other plugins, as well.
Anyways, after adding these two lines to the Awake function of SkinnedWindow.cs, the problem disappeared on Unity 2017.2.0f3.
It also works fine on Unity 2017.3.0p2 but I don’t have Unity 2017.3.0f1 installed so I couldn’t test it on that version.
I’ve pushed an update to the GitHub repository and will push an update to the Asset Store version, as well. The update includes a bugfix for those terrible sprites, too.
Great asset. The only issue I noticed was it can sometimes be hard to click on the little arrows, but that’s a minor problem and not really an “issue”.
This asset helped us solve a problem in one of our apps after we swapped some stuff around.
Hi there,
I love this asset, it’s awesome and useful and I’m currently using it in a customer’s project. However, I do have two severe issues I can’t solve myself, concerning the Runtime Hierarchy:
I need to use the slider like a normal slider, as you see it everywhere. It seems to work like something for a touch input, but that’s not usable for me.
I can’t get a horizontal slider working. This seems to be an issue due to the massive use of content size fitters and layout groups, and I tried to get into this, but it’s too complex for me to dig in (not the fitters themselves, but the use of it in the runtime hierarchy).
Could you please provide some help for that? I would appreciate it a lot.
Thanks in advance!
Just had a play with your asset and its very good, one feature I would like is to be able to drag and drop GameObjects in the Hierarchy to parent them together or to unparent them, like you can with the Editor Hierarchy.
Scratch that! Its does work, its just you have to hold the mouse down for a bit, as per setting Create Dragged Reference On Hold, and Dragged Reference Hold Time. Thank you!!!
Only missing feature to match Editor Hierarchy is that when you drag over a parent object it would be nice if it expanded the sub objects so you can drop the object onto a child.
You are welcome! In case you didn’t know, you can also drop a “Dragged Reference” to Object slots in RuntimeInspector (if they are of compatible types).
P.S. I’ve decided to add this feature to the plugin in the next update. Thanks for the idea!
This is amazing! It makes so easy testing different values for our own games, making changes in runtime to see how they behave, without creating new debug canvas (this is too boring and time consuming).
Is there a function to automatically select a specific game object? I would like to use for my vehicle, so it would begin with it selected.