Skip to content

Latest commit

 

History

History
233 lines (160 loc) · 12.4 KB

README.md

File metadata and controls

233 lines (160 loc) · 12.4 KB

Giant Particle - Inspector Graph

The Inspector Graph is a tool to better visualize, understand and manipulate objects in a reference hierarchy.

Window Sample

Index

Main Features

  • Floating inspector window per object
  • Multiple View modes available per object
  • Support for different reference types
    • Direct Reference
    • Nested Prefab
  • Visual representation of references from objects
  • In-Place field editing
  • Zoom control for better visualization
  • Per project settings with customization options
  • Object type filtering
  • and more...

Change log

Take a look at the latest changes here.

Project Settings

The Project settings section is where the per project settings of this tool are controlled. You can access this section either via the Edit menu under the Inspector Graph Window or via Unity Edit > Project Settings....

The data is saved in your project under ProjectSettings/GiantParticle/InspectorGraphSettings.asset.

Project Settings

Inspector Window Settings

  • Max Windows: Indicate the maximum number of Inspector Windows that will be displayed. 100 is the maximum limit, otherwise Unity starts to complain about it.
  • Max Preview Windows: Indicate the maximum number of windows that can display the Preview Mode. After this number is reached, new windows will be forced to display a static preview (Icon based on the object type). This is to avoid potential performance issues, feel free to change this value if your computer is capable and/or your project is not that resource intensive.
  • Default Inspector Window Size: Indicate the default size of each Inspector Window based on the View Mode

Filter Settings

  • Enable Filters: This field enables or disables all filters.

Type Filters

Type filters are an easy way to control the visibility or expansion of objects of certain types. In this section you can add or remove filters based on your preferences and the types available in your project.

  • Type Full Name: This is the fully qualified name of the object type to filter without the assembly name (See Type.FullName)
  • Display Type: Indicate to display, or not, objects of the given type
  • Expand Type: Indicate to expand the graph from a visible object of the given type

When clicking the Type Full Name field, you will see a popup with all available types in your project, just search for the one you are looking for via the search bar and double-click it to autocomplete the field or manually type in the type.

Type Selection Popup

Diagram Connections Settings

  • Draw Reference Count: This field indicate to show or hide the reference counter in case an object references another multiple times.
  • Connection Colors: Indicate the colors used for each representation of a reference.

Main Window

The main window has multiple controls for you to use which are explained in this section.

View Menu

The View menu lets you control some visual elements of the graph hierarchy.

View Menu

  • Refresh: The refresh button lets you update the current graph with any changes that were not picked up while editing. It also rearranges the untouched windows in the graph to accommodate new windows or window positions.
  • Reset: The reset button allows you to reset all windows to their default state, position and size.

Filters

The filters submenu allows you to temporarily control the visibility and/or expansion of inspectors based on the type of object being inspected. By default there are 3 types available: UnityEngine.GameObject, UnityEditor.MonoScript and UnityEngine.U2D.SpriteAtlas you can add or remove these under the Project Settings section.

Filters

  • Show: This option shows or hides the visualization of any reference of the indicated type involved in the hierarchy.
Show UnityEditor.MonoScript
Disabled
Show UnityEditor.MonoScript
Enabled
Script View Disabled Script View Enabled
  • Expand: This option enables or disables the visualization of references within the objects with the indicated type.

Note: In the case of Prefabs (UnityEngine.GameObject), the expansion of them includes references from scripts within the prefab and nested prefabs. Note that all modifications to the nested prefabs are visualized correctly. For example, if a nested prefab reference to a Mesh A is modified to be Mesh B, Mesh B will show up in the graph while Mesh A will not.

Expand UnityEngine.GameObject
Disabled
Expand UnityEngine.GameObject
Enabled
Prefab References View Disabled Prefab References View Enabled

Edit Menu

The Edit menu currently has only one option that opens the Inspector Graph project settings.

Edit Menu

Help Menu

The Help Menu has useful links

Help Menu

  • Documentation: Links to this document
  • Report a bug: Link to the GitHub page to create a new issue
  • Website: Link to the Official website of this tool

Inspected Object Reference

This field is located at the upper right corner and allows you to assign a reference of an object you want to inspect.

Inspected Object Reference

Zoom Controls

The Zoom controls are located at the bottom left corner of the main window and give you control of the scale of the visualization. The zoom level is controlled by the slider and the reset button will reset the zoom to 1.

Zoom Controls

Inspector Window

The inspector window is a small version of the Unity inspector with extra functionality to better visualize references.

Inspector Window

Window controls

Currently, the window can be minimized or extended using the buttons at the top left corner.

Window Controls

  • Minimize: The minimize button (Yellow) will collapse the window leaving only the header and the window controls visible.

Window - Minimized

  • Extend: The extend button (Green) will eliminate the height restrictions allowing for the entire inspector to be displayed.

Window - Extended

Toolbar

The toolbar provides a reference to the object being presented in the window and options to switch the representation of it (See the Views section for more information).

Window - Toolbar

Footer

At the bottom of the window you will be able to see more information and controls.

Window - Footer

Object Type

The object type name is shown at the left corner. When hovering, a tooltip will be displayed with the full name of the type.

Stats

The following information is displayed next to the object name:

  • Number of references to the object in the graph
  • Number of references from the object in the graph

Hovering over the stats will display more detailed information about the references.

Window - Quick Stats

Note: If there are more than one references from/to a single object to/from the object represented in the window, the total number of unique references will be displayed in brackets (Example: [Unique 5]).

Reference Highlight

To toggle highlight the references to and from the object represented in the window, simply press the button with a diverging arrow [ ] at the right.

Window Size Control

To resize an inspector window, press and drag the dotted icon [ ] at right.

Views

The window provides different options to visualize the content. Depending on the object compatibility some options will be disabled.

View Modes

Inspector Element

This view mode is available when an object has an inspector that supports UI Toolkit.

Note: On some occasions UI Toolkit is still supported but it is not displayed correctly.

Inspector Element Mode

IMGUI

This view mode uses the Immediate Mode GUI inspector to display the content.

IMGUI Mode

Preview

This view mode visualizes a preview of the object (If supported). Very Often, Prefabs with visual elements, 3D Models, Textures and other assets will show this option.

Preview Mode

Static Preview

The static preview mode shows an image of the object either taken from the Preview or from the default icon based on the type of object.

Static Preview - Mesh Static Preview - Shader
Mesh Static Preview Shader Static Preview

References

References are represented in the graph as curved arrows. The source of the arrow indicates the object that holds the reference and the end of the arrow represents the reference target. By default, if there is more than one reference from the source object to the target object, a number with the reference count will be displayed next to the arrow. This number can be displayed or hide via the project settings.

Reference

The color of the arrow indicate what type of reference it is:

  • White for direct reference on a serialized field
  • Cyan for nested prefab references

The colors of each reference type can be changed in the project settings.

Highlighting

The references to, and from, a specific object will be highlighted by hovering over the header of the inspector window or by activating the highlight lock (See Footer)

Reference - Normal Reference - Highlighted
Normal References Highlighted References