11. Display Anything

  04. Features No Comments

Display Any Member

With Power Inspector the objective has been to be able to display anything you can think to throw at it.

Members That Power Inspector Can Display:

  • Fields
    • Serialized fields.
    • Non-serialized fields.
    • Fields with the readonly modifier.
    • Static Fields.
    • In Debug Mode+: fields with the HideInInspector attribute.
  • Properties
    • Auto-implemented properties.
    • Properties with asymmetric accessor visibility.
    • Properties with only the get accessor.
    • Properties with only the set accessor.
  • Methods
    • Instance methods.
    • Static methods.
    • Methods with parameters.
  • Indexers
    • Single-parameter indexers.
    • Multi-parameter indexers.

Types That Power Inspector Can Display

Power Inspector can display just about any Type imaginable.
Examples of supported types include:

  • Multi-Dimensional Array
  • Jagged Array
  • Dictionary
  • HashSet
  • Type
  • Delegate
  • Interface
  • Nullable
  • System.Object
  • DateTime
  • TimeSpan
    and many more…

To learn how you can control member visibility in Power Inspector refer to the class member visibility page.

Full Undo Support

Undo and redo works fully with these new types when you edit them through Power Inspector, even if Unity can’t handle serializing them.

Note About Serialization

While Power Inspector can handle displaying all kinds of exotic data types, be aware that it does not handle serializing that data for you. As usual, you will still need to serialize any data that Unity won’t for yourself, otherwise changes you make to those values through the inspector will not be saved.

The SerializeReference attribute that is coming in Unity 2019.3 might help a lot with serializing these values for you automatically!