Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Power Inspector | Complete Inspector Rewrite

Discussion in 'Assets and Asset Store' started by SisusCo, Aug 28, 2019.

?

What Are Your Favorite Features?

  1. Back and Forward Buttons

  2. Search Box

  3. Split View

  4. Copy-Paste

  5. Debug Mode+

  6. Quick Invoke Menu

  7. Create Script Wizard

  8. Keyboard Friendly

  9. Improved Tooltips

  10. Target Window

Multiple votes are allowed.
Results are only viewable after voting.
  1. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    What Is Power Inspector?

    Power Inspector is not just another Custom Editor inside the default inspector, but instead it completely flips the script; it is a totally new window that replicates all the features of the original inspector - and then adds a lot more on top of that.

    If I've done my job right, Power Inspector should feel comfortably familiar to pick up, even though under the hood everything has changed.

    This has been a massive project that's been years in the making with more than
    100 000 lines of code.

    Why Go Through All This Trouble?

    The goal with this project has been to gain access to the minute details of the inspector's functionality, so that it becomes possible to start eliminating pain points and improving workflow at a much deeper level than previously possible.

    For example, the way that you move control focus with the keyboard arrows in the default inspector has always bugged me. But with the default inspector it was basically impossible to do anything about this, because I could not get detailed information about all the elements inside the inspector view. With Power Inspector this is no longer an issue, configuring every aspect of the inspector experience was now a possibility, and I could implement perfect keyboard support.

    And once the foundations had been laid, I could really start going crazy and keep implementing feature after feature on top of this new framework.


    Asset Store - Buy Power Inspector
    Webpage - Find the blog, contact information...
    Online Documentation - Full details on features
    Issue Tracker - Report and track bugs
    Join Mailing List - Be in the know


    Features

    Search Box


    All the other main views in Unity have a search box, so I though why not the inspector too?
    There are currently seven different filtering modes that can be used. You can run, data, but you can't hide!
    read more

    Split View


    The inspector can be split into two parts in order to display the data of two targets simultaneously side by side. The middle mouse button can be used as a shortcut to open a mouseovered target in the split view (I call this "peeking").
    read more

    Back and Forward Buttons


    Back and forward buttons have been integrated into a toolbar above the inspector.
    read more

    Copy-Paste


    I added copy-paste support to almost everything in the inspector. I use the system clipboard to hold the copied data, which has turned out to be a surprisingly convenient thing, making it easy to do things like backup any data from the inspector view into a text editor.
    Pro tip: One of my favorite use cases for this is copying import settings from existing textures into ones that were just added to the project.
    read more

    Debug Mode+


    I replicated the debug mode in the default inspector and extended it by adding support for viewing non-serialized members, fields with the HideInInspector attribute, hidden components, properties, methods and static class members.
    Also I noticed that what I often wanted was to activate debug mode only temporarily and only for a single component, which is why I decided to add a new debug mode toggle button into the toolbar above every component.
    read more

    Quick Invoke Menu


    I ran into this scenario often: I wanted to invoke a method in a class for testing purposes. To do this, I open the script in my script editor, add the ContextMenu attribute above the method, wait for scripts to recompile, and then I'm able to invoke the method from the context menu. If I was in play mode at the time, I have to restart my play session. Once I'm done testing, I have to repeat many of the same steps to remove the ContextMenu attribute too.
    To streamline this process I added a button into the header of all Components and other UnityEngine.Objects that can be used to invoke methods at any time.
    read more

    Create Script Wizard

    Creating new scripts and attaching them to targets is arguably fastest to do using the Add Component menu in the default inspector.
    However all scripts are added to the root of your project, and inside the default namespace. In some projects I've worked on this has lead to the project root being full of unorganized scripts, and let me tell you it is not a fun situation to be in.
    To combat this problem I hooked a script creation wizard into the Add Component button in Power Inspector. The idea is to combine fast script creation with the ability to quickly define where the scripts are saved and in which namespace. This saves you the trouble of having to move the scripts around later on, and then having to wait for scripts to recompile.
    read more

    Keyboard Friendly


    Like I mentioned before, I rewrote the field focusing system inside the inspector from scratch so that everything works intuitively as it should.
    I also added keyboard support to everywhere where I found it was missing. I feel that small things like being able to use page up, page down, home and end inside popup menus can do a lot for making it fun to use the keyboard for navigating inside the inspector.
    I also introduced shortcuts for some common actions like copy (Ctrl+C), paste (Ctrl+V) and reset (backspace).
    read more

    Improved Tooltips


    Tooltips can be a really useful tool for offering additional information about controls.
    But how does the user know which controls have them and which not? I added a tooltip indicator so that users will always know when there's additional information available for a field.

    Also it found it irritating that I had to add the same information once using comments in code to get tooltips in my IDE, and then a second time using Unity's Tooltip attribute to get tooltips in the inspector. To solve this issue I made it so that Power Inspector automatically generates tooltips from the comments in your code for all fields, properties and methods.
    read more

    Improved Script Editor


    I found it really difficult to preview code of script assets inside the default inspector, because it had no syntax highlighting, and the combination of really wide tab character and word wrapping made it hard to keep discern which row you were on.
    I made a new script editor that fixes everything that bugged me about the default script inspector.
    read more

    Target Window


    To improve the working experience when using ultra-wide monitors or a multi-monitor setup, I made it possible to have different inspector windows for the hierarchy and project views.
    read more

    Plug and Play

    Making Power Inspector work in plug-and-play fashion, and to keep it as decoupled from code as possible, was important to me.
    I've had experiences in the past where some extension I was using started to get buggy with new Unity versions, but I was unable to easily remove it from my project because of the number of references I had to it in my code.
    To help reduce this risk I tried to make as many features usable without needing to do any changes in code.
    read more

    More Information

    You can find more in-depth explanations about all the features of Power Inspector in the Online Documentation.
     
    Last edited: Feb 12, 2022
  2. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    To celebrate the launch, you can now snatch Power Inspector for yourself for 40% below its normal asking price! :eek:
     
  3. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
  4. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Since I've had the same question asked a couple of times now, I'll put an answer out here too:
    Yes, Power Inspector and Odin Inspector can be used together at the same time.

    I wrote a documentation page detailing how to set them up optimally so that you get the best of both worlds:
    Compatibility With Odin Inspector
     
    Bezoro likes this.
  5. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Version 1.0.2 is now available from the asset store.
     
  6. Fronne

    Fronne

    Joined:
    Sep 25, 2014
    Posts:
    112
    My compliments for the docs, looks very neat and complete! Really incredible what seems to be possible with Power Inspector, I think I'll just download it and see if it meets my expectations...

    Cheers!
     
  7. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Thanks @Fronne ! I hope you'll find the the software just as neat as the documentation :)
     
  8. pocketpair

    pocketpair

    Joined:
    Jul 7, 2015
    Posts:
    72
    @SisusCo
    Hi, this asset looks good!

    Unfortunately v1.2.0 has 2 compile errors on 2019.3b6.
    FieldDrawer.cs: CanBeNull => CanBeNullAttribute
    UnityObjectDrawer.cs: add protected const float ComponentHeaderToolbarIconHeight = 16f;

    I've fixed by myself, but I'm not sure about sufficient test on 2019.3.
    How about it?

    Also, I'd like to know the increment of compile time with power inspector since this is large code base.
    How do you think about it?

    Thank you for your help.
     
  9. pocketpair

    pocketpair

    Joined:
    Jul 7, 2015
    Posts:
    72
    Oh, not working on material on 2019.3b6...
    I will look forward to it for now.
     
  10. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Hi @pocketpair

    Thanks for letting me know about these issues.

    I noticed the same compile errors in 2019.3 beta and pushed a fix out for it yesterday, and version 1.2.1 just went live containing the fixes.

    The material drawer indeed seems to be broken in 2019.3 beta. I'll add support for it in the next update.


    Power Inspector comes preconfigured with assembly definition files, so in theory it should not affect your compile times at all when you make changes to your scripts, as long as you don't have references in your code to Power Inspector.

    When I change code inside the main Power Inspector assembly it takes around 4 seconds to fully recompile everything on my computer.
     
  11. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    @pocketpair

    I just pushed out a new update that fixes the material drawer and improves support overall for the 2019.3 beta version of Unity.

    The update will be available for download as soon as it passes the asset store's approval process. This usually takes around a day, but I'm not sure if any updates are being approved before next Monday.

    Have a nice weekend!
     
  12. LuiBroDood

    LuiBroDood

    Joined:
    Mar 13, 2019
    Posts:
    84
    could it be possible at all to have like color coded script areas? like.. the entire area of a script is like slightly blue and another is green ?

    i mean as an extra idea
     
  13. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Hi @LuiBroDood . Thank you for the suggestion!

    I did a quick test to see how easy it would be to pull this off. Turns out you can get pretty decent results right out of the gate:



    The dynamic prefix column resize control currently looks pretty bad on top of the custom color, though. A quick workaround for this would be to switch the drawer to use the top-only resize control that is usually used by all custom editors:


    However, I'll see if I can improve how the resize control is drawn, so that it works better with backgrounds of all different colors, so there's no longer need for such a workaround.

    This is how the Draw method of my test ColoredComponentDrawer ended up looking:

    Code (CSharp):
    1.         /// <inheritdoc />
    2.         public override bool Draw(Rect position)
    3.         {
    4.             // Draw the background color
    5.             DrawGUI.Active.ColorRect(position, color);
    6.  
    7.             // Also temporarily set all background colors in theme to match this color.
    8.             var theme = inspector.Preferences.theme;
    9.             GUIThemeColors.BackgroundColors previousBackgroundColors;
    10.             var transparentColor = new Color(0f, 0f, 0f, 0f);
    11.             theme.SetBackgroundColors(transparentColor, out previousBackgroundColors);
    12.  
    13.             bool dirty;
    14.             try
    15.             {
    16.                 dirty = base.Draw(position);
    17.             }
    18.             catch(Exception)
    19.             {
    20.                 theme.RestoreBackgroundColors(previousBackgroundColors);
    21.                 throw;
    22.             }
    23.  
    24.             theme.RestoreBackgroundColors(previousBackgroundColors);
    25.             return dirty;
    26.         }
     
    Last edited: Mar 5, 2020
  14. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Now that's much better...

     
    Last edited: Mar 5, 2020
  15. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Power Inspector was just updated to version 1.2.5. You can learn more about what new features were added here.

    If you would like to be kept informed about major new Power Inspector releases, you can also subscribe to our newsletter here.
     
  16. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    Very impressed by this, will most likely buy it soon :)

    Good to hear that it works fine with Odin.
     
  17. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    @N00MKRAD Thank you, I hope you will enjoy it a lot!

    Yes indeed. It has become very clear that having great Odin support is pretty much mandatory, based on the number of people asking about it at least :D Not that its surprising, it does offer some pretty awesome features, and it makes sense that there would be a lot of overlap in people interested in both products :)
     
  18. LuiBroDood

    LuiBroDood

    Joined:
    Mar 13, 2019
    Posts:
    84
    HYYPE!! INSTABUY
    soo how would i use ColoredComponentDrawer exactly?
    thanks!

    GOOD STUFF!

    oh i found it

    Code (CSharp):
    1.     /// [UseDrawer(typeof(ColoredComponentDrawer), 0.246f, 0.55f, 1f, 1f)]
    2.  
    3.     /// public class TestColoredDrawer : MonoBehaviour { }
    4.  
    5.  
    6.  
    7. [Sisus.Attributes.UseDrawer(typeof(Sisus.ColoredComponentDrawer), R, G, B, A)]
     
    Last edited: Nov 2, 2019
  19. LuiBroDood

    LuiBroDood

    Joined:
    Mar 13, 2019
    Posts:
    84
  20. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    @ LuiBroDood

    Ah yes, I did not think to add support for combining custom editors with the colored background!

    I'll add a variant of ColoredComponentDrawer that utilizes a custom editor. I'll also add a new attribute purpose-built for changing the background color, so that the right drawer can be selected automatically. Something like BackgroundColorAttribute(r, g, b, a).

    Does this solution sound like something that would serve you well?


    I also do like the idea of being able to draw the class members of ScriptableObject references directly inside a single inspector view, and have been planning to introduce support for doing something like that in Power Inspector at some point in the future.
     
  21. LuiBroDood

    LuiBroDood

    Joined:
    Mar 13, 2019
    Posts:
    84
    yeah the SOs in the inspector is amazing to have,
    yeah man thanks alot for being so helpful!

    oohh i can middle click peek them in the split view, that works for now yeah,

    having the SOs as a dropdown thing is really nice though
     
    Last edited: Nov 3, 2019
    SisusCo likes this.
  22. flamingogs

    flamingogs

    Joined:
    Jan 28, 2019
    Posts:
    1
    Hello

    Latest version not working with Unity 2018.4. Could you check this version?

    Thanks
     
  23. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Hi @flamingogs

    I'm sorry to hear that you've encountered issues.

    I installed Unity 2018.4 and tested the current version in it. I think I found the issue you're talking about and implemented a fix. I'll put out an update asap. Hopefully it won't take very long for it to pass the asset store validation process.
     
  24. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Version 1.2.7 is now live in the asset store. Installing it should fix the issue in Unity version 2018.4 @flamingogs .

    A new feature called Categorized Components Mode was also introduced in this version. If you find yourself having GameObjects with so many components that it becomes hard to manage, you should give this one a go!

    categorized-components-off-and-on.png

    You can learn more about the feature here.

    Let me know if you find this feature useful or if you have any ideas about how it could be developed further.


    @LuiBroDood You might want to check out the BackgroundColorAttribute that has also been added :)
     
  25. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    I have a few problems with my PI:
    1) I can't see the material drawer (2018.4.12f1) on any GO at all
    2) Add Component menu causes an exception (just cilcking the button, it causes the entire Power Inspector tab to just stop responding, so I have to close it and open it again

    For more info, I'm using Odin Inspector, in case that causes problems?

    Code (csharp):
    1.  
    2. [Exception] NullReferenceException: Object reference not set to an instance of an object
    3. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    4. AddComponentMenuItems.GetOrCreateGroup()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:460
    5. 458:   //first try to find an existing group with given group labels
    6. 459:   string rootGroup = groupsLabels[0];
    7. -->460:   for(int i = options.Length - 1; i >= 0; i--)
    8. 461:   {
    9. 462:       var group = options[i];
    10.  
    11. AddComponentMenuItems.GetOrCreateGroup()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:468
    12. 466:   if(groupsLabels.Count > 0)
    13. 467:   {
    14. -->468:       var result = GetOrCreateGroup(ref groupsLabels, group, ref group.children, icon);
    15. 469:       groupsLabels.Clear();
    16. 470:       return result;
    17.  
    18. AddComponentMenuItems.GetOrCreateGroup()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:468
    19. 466:   if(groupsLabels.Count > 0)
    20. 467:   {
    21. -->468:       var result = GetOrCreateGroup(ref groupsLabels, group, ref group.children, icon);
    22. 469:       groupsLabels.Clear();
    23. 470:       return result;
    24.  
    25. AddComponentMenuItems.GetOrCreateGroup()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:435
    26. 433:       pathBuilder.Add(label);
    27. -->435:       return GetOrCreateGroup(ref pathBuilder, null, ref rootGroups, icon);
    28. 436:   }
    29.  
    30. AddComponentMenuItems.Add()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:416
    31. 414:   #endif
    32. -->416:   var group = GetOrCreateGroup(groupLabels, null);
    33. 417:   group.AddChild(itemLabel, type);
    34. 418:   pathBuilder.Clear();
    35.  
    36. AddComponentMenuItems.Add()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:383
    37. 381:       }
    38. 382:       path = StringUtils.SplitPascalCaseToWords(path);
    39. -->383:       Add(type, path);
    40. 384:   }
    41.  
    42. AddComponentMenuItems.GenerateItems()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:267
    43. 265:       }
    44. -->267:       Add(type);
    45. 268:   }
    46.  
    47. AddComponentMenuItems.Setup()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:89
    48. 87:       if(!itemsGenerated)
    49. 88:       {
    50. -->89:           GenerateItems();
    51. 90:       }
    52. 91:   }
    53.  
    54. AddComponentMenuItems.GetAll()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:36
    55. 34:   public static AddComponentMenuItem[] GetAll()
    56. 35:   {
    57. -->36:       Setup();
    58. 37:       return rootGroups;
    59. 38:   }
    60.  
    61. AddComponentMenuItems.GetFiltered()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuItems.cs:49
    62. 47:   if(filterLength == 0)
    63. 48:   {
    64. -->49:       return GetAll();
    65. 50:   }
    66.  
    67. AddComponentMenuDrawer.RebuildIntructionsInChildren()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuDrawer.cs:182
    68. 180:   if(activeItem == null)
    69. 181:   {
    70. -->182:       values = AddComponentMenuItems.GetFiltered(FilterString);
    71. 183:   }
    72. 184:   else
    73.  
    74. AddComponentMenuDrawer.SetTarget()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuDrawer.cs:157
    75. 155:       target = value;
    76. 156:       inspector = setInspector;
    77. -->157:       RebuildIntructionsInChildren();
    78. 158:   }
    79.  
    80. AddComponentMenuDrawer.Setup()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuDrawer.cs:147
    81. 145:   {
    82. 146:       onClosed = setOnClosed;
    83. -->147:       SetTarget(setInspector, setTarget);
    84. 149:       Open(openPosition);
    85.  
    86. AddComponentMenuDrawer.Create()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentMenuDrawer.cs:119
    87. 117:           instance = new AddComponentMenuDrawer();
    88. 118:       }
    89. -->119:       instance.Setup(setInspector, target, openPosition, onClosed);
    90. 120:       return instance;
    91. 121:   }
    92.  
    93. AddComponentMenuWindow.Setup()    Assets/Plugins/Sisus/Power Inspector/Code/Editor/EditorWindow/AddComponentMenuWindow.cs:125
    94. 123:   if(drawer == null)
    95. 124:   {
    96. -->125:       drawer = AddComponentMenuDrawer.Create(inspector, target, unrollPosition, Close);
    97. 126:   }
    98. 127:   else
    99.  
    100. AddComponentMenuWindow.Create()    Assets/Plugins/Sisus/Power Inspector/Code/Editor/EditorWindow/AddComponentMenuWindow.cs:56
    101. 54:       }
    102. 55:       instance = CreateInstance<AddComponentMenuWindow>();
    103. -->56:       instance.Setup(inspector, target, unrollPosition, onClosed);
    104. 57:   }
    105.  
    106. AddComponentMenuWindow.CreateIfInEditorMode()    Assets/Plugins/Sisus/Power Inspector/Code/Editor/EditorWindow/AddComponentMenuWindow.cs:37
    107. 35:       if(Platform.EditorMode)
    108. 36:       {
    109. -->37:           Create(inspector, target, unrollPosition, onClosed);
    110. 38:       }
    111. 39:   }
    112.  
    113. AddComponentButtonDrawer.Open()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentButtonDrawer.cs:250
    114. 248:       #endif
    115. -->250:       onOpen(inspector, parent as GameObjectDrawer, buttonRect, Close);
    116. 251:   }
    117.  
    118. AddComponentButtonDrawer.OnClick()    Assets/Plugins/Sisus/Power Inspector/Code/Drawers/Menu/AddComponentMenu/AddComponentButtonDrawer.cs:272
    119. 270:   if(!open)
    120. 271:   {
    121. -->272:       Open();
    122. 273:       DrawGUI.Use(inputEvent);
    123. 274:       return true;
    124.  
    125. Inspector.OnMouseDown()    Assets/Plugins/Sisus/Power Inspector/Code/Inspector/Core/Inspector.cs:1418
    126. 1416:   #endif
    127. -->1418:   if(mouseovered.OnClick(e))
    128. 1419:   {
    129. 1420:       #if DEV_MODE && DEBUG_ON_MOUSE_DOWN
    130.  
    131. InspectorUtility.BeginInspector()    Assets/Plugins/Sisus/Power Inspector/Code/Inspector/InspectorUtility.cs:492
    132. 490:   {
    133. 491:       inspector.LastInputTime = Platform.Time;
    134. -->492:       inspector.OnMouseDown(e);
    135. 494:       //give controls time to react to selection changes, editing text field changes etc.
    136.  
    137. PowerInspector.OnGUI()    Assets/Plugins/Sisus/Power Inspector/Code/Inspector/Power Inspector/PowerInspector.cs:100
    138. 98:   #endif
    139. -->100:   InspectorUtility.BeginInspector(this, ref anyInspectorPartMouseovered);
    140. 102:   Rect toolbarRect;
    141.  
    142. InspectorDrawerWindow.OnGUI()    Assets/Plugins/Sisus/Power Inspector/Code/Editor/EditorWindow/InspectorDrawerWindow.cs:1719
    143. 1717:   }
    144. -->1719:   mainView.OnGUI(windowRect, anyInspectorPartMouseovered);
    145. 1721:   if(!anyInspectorPartMouseovered)
    146.  
    147. MonoMethod.Invoke()    <e1319b7195c343e79b385cd3aa43f5dc>:0
    148.  
    149. MonoMethod.Invoke()    <e1319b7195c343e79b385cd3aa43f5dc>:0
    150.  
    151. MethodBase.Invoke()    <e1319b7195c343e79b385cd3aa43f5dc>:0
    152.  
    153. HostView.Invoke()    C:/buildslave/unity/build/Editor/Mono/HostView.cs:342
    154.  
    155. HostView.Invoke()    C:/buildslave/unity/build/Editor/Mono/HostView.cs:336
    156.  
    157. HostView.InvokeOnGUI()    C:/buildslave/unity/build/Editor/Mono/HostView.cs:310
    158.  
    159. DockArea.DrawView()    C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361
    160.  
    161. DockArea.OldOnGUI()    C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320
    162.  
    163. IMGUIContainer.DoOnGUI()    C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266
    164.  
    165. IMGUIContainer.HandleIMGUIEvent()    C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438
    166.  
    167. IMGUIContainer.HandleIMGUIEvent()    C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421
    168.  
    169. IMGUIContainer.HandleEvent()    C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401
    170.  
    171. EventDispatcher.PropagateEvent()    C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:754
    172.  
    173. EventDispatcher.ProcessEvent()    C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:599
    174.  
    175. EventDispatcher.Dispatch()    C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307
    176.  
    177. BaseVisualElementPanel.SendEvent()    C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176
    178.  
    179. UIElementsUtility.DoDispatch()    C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245
    180.  
    181. UIElementsUtility.ProcessEvent()    C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68
    182.  
    183. GUIUtility.ProcessEvent()    C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179
    184.  
     
  26. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Hi @f0ff886f and thanks for bringing these to my attention!

    I might already have fixed the second issue locally a few days ago when I added code for automatically removing missing types from the add component menu configuration. I'll try it out in Unity 2018.4 with Odin to confirm this.

    Unity changed some behaviors of the MaterialEditor in a past update, and I've had to implement different solutions for drawing it in different Unity versions. I probably need to tweak the preprocessor directives a bit to get it working in Unity 2018.4.

    I'll put an update out as soon as I've fixed both issue.
     
    f0ff886f likes this.
  27. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Power Inspector has been updated to version 1.2.8!

    List of all new features can be found here.
     
  28. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    @SisusCo I'm loving Power Inspector already, as it's apparent from my store review, just great stuff. :)

    That said, I have a GUI issue that also throws a UnityEngine.GUIUtility ProcessEvent(Int32, IntPtr) error log.

    jXcMT58MEe.png

    Also, if you are open to feature requests: if we could pingobject by a left-click on the Inspector header, that would be awesome. ;)

    i0f5DGUalt.png
     
  29. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Hey there @Gregorik ! I'm really glad to hear that you have been enjoying Power Inspector :)

    I recently added support for dynamically calculated header heights (in order to support the rare case of custom Editors changing the header height), and that caused a bug with the Open In Prefab Mode button drawn incorrectly for prefabs. Thanks for bringing this to my attention! I'll put out an update with this fixed soon.

    I was not able to replicate the GUIUtility ProcessEvent error yet though. Could you send me the error log in full so I can look into it?

    I'm definitely open for feature requests. User feedback is really valuable to me as it helps me focus my efforts in areas that users actually care about the most. So keep 'em coming! :D

    In Power Inspector you can currently ping Objects by middle-clicking headers. Also in the case of MonoBehaviour components this can be used to ping the script asset for the component - which btw is a big part of why I decided to hide the script reference field for all components by default.

    Admittedly information about this feature is currently quite difficult to find. I'll see if I can think of some ways to improve discoverability for this.
     
    AGregori likes this.
  30. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    In that case it may be a local conflict with one of the other GUI-affecting assets I'm using (FuzzyTools, NGTools etc.). Allow me to look into it before burdening you with my local issues. ;)


    That's so great! I thought we need to do it from the context menu. (Btw I could never make inspector headers pingable from code myself, but that's just my poor c# skills speaking.)

    Also, I read your post at https://www.sisus.co/how-to-build-a-trailer-using-unity/, pretty helpful in its own right! I didn't even know about MKVToolnix.
     
    Last edited: Jan 8, 2020
  31. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Yeah that is one of the big benefits of having gone whole hog in rebuilding the inspector. Pretty much any idea imaginable can now be implemented :)
     
    AGregori likes this.
  32. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    OK when we middle-click on a parent header, it pings the Project prefab itself. When it's a child header, it pings the Hierarchy gameobject. This is very useful functionality. But what if we need a parent to be pinged in the Hierarchy, is there a workaround for that? :)
     
  33. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    To ping a prefab instance in the hierarchy you can either:
    1. middle-click the transform header or
    2. select "Ping" from the GameObject header context-menu.
     
    AGregori likes this.
  34. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    Thanks, the transform header variety is cool and intuitive.
     
    SisusCo likes this.
  35. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    This is all I get when I click on a prefab in the project window. It's Power Inspector related, as it hasn't happened before I installed it.

    GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
    UnityEngine.GUIUtility ProcessEvent(Int32, IntPtr)
     
  36. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    I wonder why Material drawers aren't rendered in Power Inspector, I checked in preferences but found no clue.

    goflMbtQYa.png
     
  37. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    I still have not been able to fully replicate this. The error is likely only shown when Power Inspector is used in combination with some other plugins.

    I was able to observe some GUILayout related errors in Unity 2020.1 Beta when selecting a prefab, but in my project the errors were caught and handled internally, so they shouldn't even be perceptible outside of developer mode. Still, fixing the source of the error might get rid of GUI Error you're seeing, so I'll start working on a way to get rid of it.

    The feature of Renderer material drawers being embedded inside the GameObject drawer is still missing from the current version of Power Inspector. The good news is that I did manage to get the feature implemented just this week, so it will be included with the next update as well.

    For now you can manually inspect a material on a Renderer by double-clicking it in the inspector. You can also inspect it in split view by right-clicking it and selecting "Peek".
     
    AGregori likes this.
  38. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    jeez I'm sucker for buying these tools.. but good job :) this is what unity 2019/2020 should have had done for the ux upgrade.. instead of the stale and flat gui update that happened and absolutely zero ux improvements really.

    not tried it yet but on the "Create Script Wizard" would be good to have a custom way of just copy/pasting in code/editable preview? being able to make some changes to it before it gets compiled.. often I want to try some github script, and usually create a c# file.. wait for unity to compile fk all, then edit the file with the copy pasted code with minor edits, and wait again for compile... your wizard could be better if it just allowed us to put in the custom code, and make those often minor script namespace changes etc.. and then 'ok' it for unity to compile the newly created file with the more correct code changes already in place from the get go.
     
  39. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    @Player7 Thanks a lot! Yeah, there's no shortage of new features and improvements coming to Unity, but the good ol' inspector hasn't been getting much love outside of the skin-deep changes. The SerializeReference attribute looks pretty sweet though :)

    Turning the script preview area into an editable text field is a great idea! This is going straight into the to do list...
     
  40. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Just submitted version 1.3.1 to the asset store. Once it passes validation it'll become available for download.

    @Gregorik
    I managed to get rid of GUILayout related internally handled exceptions when selecting a prefab. Hopefully this will also cause the errors you're seeing to go away.

    @f0ff886f @Gregorik
    Renderer materials are now listed in the inspector for GameObject targets. I decided to place them right below the Renderer component instead of moving them to the bottom of the inspector view like in the default inspector, because I think this is more intuitive. Let me know what you think of this change!
    I also added previews for all the Renderer materials in the preview area (which is something that doesn't happen in the default inspector).

    @Player7
    The code area in the create script wizard is now an editable text field.


    I also added a new PluginAttributeConverterProvider system. This makes it possible to add native support for non-PropertyAttribute attributes from third parties to Power Inspector without having to rely on custom base editors that they provide.

    The benefit of using a compatibility pack instead of overriding the base Editor is that Power Inspector's internal drawers can be used, along with all the additional features they offer.

    I created compatibility packs for NaughtyAttributes and Odin using this system.

    The Odin converter will automatically be used if Odin is installed but has been disabled in the inspector for the target in question (via Odin's preferences). Currently 13 attributes are supported.

    The NaughtyAttributes converter currently has to be manually enabled by installing its compatibility package. If it is installed the NaughtyAttributes custom Editor will be globally disabled inside Power Inspector. Currently 14 attributes are supported.

    I'll add more details about this feature in the documentation soon.
     
    AGregori likes this.
  41. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    @SisusCo Can't wait for 1.3.1 then!
    I'll also bombard you with new feature requests once it's out. ;)
     
    SisusCo likes this.
  42. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    There's a download error with 1.3.1 both on the asset store & the package manager. I tried emptying my store cache & try again, doesn't work. Download works okay with other assets. Seems like a corrupted upload, please check.

    nYb4R5DRKt.png

    Unity_YrPQWOWACT.png
     
  43. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Thanks for letting me know! I was not able to download the new update from the store either. I'll reupload it now.
     
  44. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    Still doesn't work.
     
  45. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Unfortunately it needs to go through the asset store's validation process again, even though no changes were made. This usually takes around one day.
     
  46. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
  47. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    There are two main reasons for why I decided to bundle a custom Json.NET package with Power Inspector.
    1. Simple plug-n-play setup. Users don't need to install any additional packages, they just install Power Inspector and it immediately works.
    2. Reduced risk of conflicts. There are many different Json.NET packages for Unity out there, most of them using the same dll name and namespace and conflicting with each other. Many plugins in the asset store rely on specific variants of these packages. By bundling a custom dll with a unique name and namespace, I can make sure that it doesn't conflict with any other plugins in the asset store.
     
    Last edited: Jan 14, 2020
  48. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    yeah true you did stick it in a namespace that wasn't causing any conflicts unlike some others :)

    https://forum.unity.com/threads/browser-like-features-in-inspector.473703/#post-4675499

    Could you add something like that inspector history.. where it shows a mini chip history of things selected... Currently the < > buttons are a bit blind, where is how I used to have it with that addon made good use of the space and provided extra in functionality being able to view a small history of past selected things.

    Also the split tab... would be nice to have option to have a color border at the top of the 2nd panel to distinguish quicker bit like https://i.imgur.com/se5Qryp.png 2019.3 flat gui is incredibly crap just harder to notice 2 separate panels when most elements in even a single panel don't even have gradient/depth etc
     
  49. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    You can currently open a visual list of the 30 last selected items by right-clicking the back button.

    I'm not sure if I will be adding the option to always display the list directly on the toolbar, as even displaying a few items would consume a quite a bit of horizontal space, especially if the targets have long names (and not to mention the case of multi-target selections). The toolbar currently doesn't support having multiple rows either, so the history list would have to share the available horizontal space with all the other toolbar buttons. If I add support for multiple toolbar rows in the future I might reconsider adding this.

    It is very simple to add your own buttons to the toolbar though, so if you really wanted this feature now it probably wouldn't be that difficult to roll your own solution. I'll take a look at the SelectionHistory class and make sure that the history data is publicly accessible to external classes.

    This looks like it could indeed improve readability and should be simple to add in too. Thanks for the idea! I'll probably add at least the ability to draw a separator line of configurable color in the next update. I'm not sure about the blue color though as that is also used to indicate drop targets when reordering components or dragging script assets into the inspector. Perhaps something like yellow or cyan could be a good default color, I'll have to do some testing.
     
    Last edited: Jan 14, 2020
  50. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,282
    Downloading Power Inspector from the asset store is now working again.
     
    AGregori likes this.