Search Unity

[RELEASED]Power Inspector - Full Inspector Overhaul

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. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    366
    Material listing works fine, and no errors thrown in 1.3.1, all cool.

    The Show in Explorer button is great. There's a long (3second?) lag after pressing it though, but it may be a local issue of my own rig.

    Unity_IqZWPxrut0.png
     
  2. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    366
    Actually, there is a major error: in material drawers, I can't choose items from pulldown menus. For instance, can't choose other than Opaque in this one:

    Unity_eMYoHUfFy8.png
     
  3. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,478
    ah yeah good point.
     
  4. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    @Gregorik thanks for reporting these issues, I'll check them out. I've had a lot of troubles with the MaterialEditor in the past, it seems to work in mysterious ways and differently in every different major Unity version.
     
  5. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    366
    @SisusCo there's a similar issue where on a Standard Specular setup, the Specular slot is not showing.

    Unity_VNYhMhySfG.png
     
  6. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    Confirmed and fixed. The MaterialEditor is now refetched every time that changes are made to any of its properties, which causes the shader-specific GUI elements to get instantly updated.


    The issue of enum popups not working in the material drawer is a strange one... At first I was able to replicate the issue, and spent many hours trying to get them working to no avail. Then when I opened up the project again today the issue had just gone away - seemingly without anything relevant to the bug having been changed in the code! I still don't have any idea what the underlying issue was, but it might be that simply restarting the project or your computer might be able to get rid of it.


    I was not able to replicate the 3 second lag when using the Show In Explorer button. The code that gets executed when the button is used is basically just this:

    Code (CSharp):
    1. EditorUtility.RevealInFinder(AssetDatabase.GetAssetPath(Target));
    So I probably won't be able to do anything to fix this on my end.
     
    Gregorik likes this.
  7. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,478
    Code (CSharp):
    1.  
    2. TypeLoadException: Could not resolve type with token 01000085 (from typeref, class/assembly UnityEngine.AssemblyIsEditorAssembly, UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
    3. System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) (at <437ba245d8404784b9fbab9b439ac908>:0)
    4. System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) (at <437ba245d8404784b9fbab9b439ac908>:0)
    5. System.Reflection.Assembly.GetCustomAttributes (System.Type attributeType, System.Boolean inherit) (at <437ba245d8404784b9fbab9b439ac908>:0)
    6. Sisus.OdinSerializer.DefaultSerializationBinder.RegisterAssembly (System.Reflection.Assembly assembly) (at E:/Unity Projects/Odin Serializer  for Power Inspector 1.1.0/OdinSerializer/Core/Misc/DefaultSerializationBinder.cs:121)
    7. Sisus.OdinSerializer.DefaultSerializationBinder..cctor () (at E:/Unity Projects/Odin Serializer  for Power Inspector 1.1.0/OdinSerializer/Core/Misc/DefaultSerializationBinder.cs:100)
    8. Rethrow as TypeInitializationException: The type initializer for 'Sisus.OdinSerializer.DefaultSerializationBinder'
    Code (CSharp):
    1.  
    2. Exception: Illegal API call was made: cannot query members of a property that are dependent on children being initialized, during the initialization of the property's children.
    3. Sirenix.OdinInspector.Editor.BaseMemberPropertyResolver`1[TValue].LazyInitialize () (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Resolvers/Property Resolvers/BaseMemberPropertyResolver.cs:58)
    4. Sirenix.OdinInspector.Editor.BaseMemberPropertyResolver`1[TValue].GetChildCount (TValue value) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Resolvers/Property Resolvers/BaseMemberPropertyResolver.cs:45)
    5. Sirenix.OdinInspector.Editor.OdinPropertyResolver`1[TValue].CalculateChildCount () (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Resolvers/Property Resolvers/OdinPropertyResolver.cs:129)
    6. Sirenix.OdinInspector.Editor.OdinPropertyResolver.get_ChildCount () (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Resolvers/Property Resolvers/OdinPropertyResolver.cs:73)
    7. Sirenix.OdinInspector.Editor.PropertyChildren.get_Count () (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyChildren.cs:80)
    8. Sirenix.OdinInspector.Editor.PropertyChildren.Get (System.Int32 index) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyChildren.cs:181)
    9. Sirenix.OdinInspector.Editor.PropertyChildren.get_Item (System.Int32 index) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyChildren.cs:41)
    10. Sirenix.OdinInspector.Editor.Drawers.Vector3Drawer.DrawPropertyLayout (UnityEngine.GUIContent label) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/Vector3Drawer.cs:35)
    11. Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:306)
    12. Sirenix.OdinInspector.Editor.Drawers.PropertyContextMenuDrawer`1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Misc Drawers/PropertyContextMenuDrawer.cs:336)
    13. Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (UnityEngine.GUIContent label) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:176)
    14. Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:544)
    15. Rethrow as OdinPropertyException: This error occurred while being drawn by Odin.
    16. Odin Property Path: lastPos
    17. Odin Drawer Chain:
    18. > PropertyContextMenuDrawer<Vector3>
    19. > Vector3Drawer
    20. > CompositeDrawer.
    21. UnityEngine.Debug:LogException(Exception)
    22. Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:594)
    23. Sirenix.OdinInspector.Editor.InspectorUtilities:DrawPropertiesInTree(PropertyTree) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:418)
    24. Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean) (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:308)
    25. Sirenix.OdinInspector.Editor.OdinEditor:DrawTree() (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:93)
    26. Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector() (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:215)
    27. Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at X:/Repositories/sirenix-development/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:85)
    28. Sisus.CustomEditorBaseDrawer`2:DrawOnInspectorGUI(Editor) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/CustomEditorBaseDrawer.cs:848)
    29. Sisus.CustomEditorBaseDrawer`2:OnInspectorGUI(Editor) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/CustomEditorBaseDrawer.cs:804)
    30. Sisus.CustomEditorBaseDrawer`2:DrawMembers(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/CustomEditorBaseDrawer.cs:684)
    31. Sisus.CustomEditorBaseDrawer`2:DrawBody(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/CustomEditorBaseDrawer.cs:652)
    32. Sisus.CustomEditorBaseDrawer`2:Draw(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/CustomEditorBaseDrawer.cs:580)
    33. Sisus.GameObjectDrawer:DrawBody(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/GameObject/GameObjectDrawer.cs:1708)
    34. Sisus.GameObjectDrawer:Draw(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/GameObject/GameObjectDrawer.cs:1533)
    35. Sisus.Inspector:DrawViewport() (at Assets/Sisus/Power Inspector/Code/Inspector/Core/Inspector.cs:1822)
    36. Sisus.Inspector:DrawViewport(Rect) (at Assets/Sisus/Power Inspector/Code/Inspector/Core/Inspector.cs:1756)
    37. Sisus.PowerInspector:OnGUI(Rect, Boolean) (at Assets/Sisus/Power Inspector/Code/Inspector/Power Inspector/PowerInspector.cs:144)
    38. Sisus.InspectorDrawerWindow:OnGUI() (at Assets/Sisus/Power Inspector/Code/Editor/EditorWindow/InspectorDrawerWindow.cs:1758)
    39. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    40.  
    41.  
    Get those errors.. also using Odin maybe its that not PowerInspector or both?
     
  8. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    @Player7

    The second error seems to originate from deep inside Odin code (Power Inspector just calls OdinEditor.OnInspectorGUI and the rest is all Odin logic), so the Odin devs would probably be in a better position to try to figure out what could be causing this one.


    The first error seems to occur from inside a dll included in Power Inspector, so that one could very well be an issue on my end. Do you have more information you could share about when exactly this error occurs?

    Could also you provide me with the following information about your project setup:
    • Unity version
    • Player Settings > Scripting Backend (IL2CPP or Mono)
    • Player Settings > Api Compatibility Level (.NET Standard 2.0 or .NET 4.x)
    • Build Target
    I tried testing the latest version of Power Inspector and Odin together in Unity 2019.2.9f1 with several different configurations but was not able to replicate either of these errors yet.
     
  9. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,478
    2019.3 f5, mono, windows... maybe a script with public fields like Transform[], Transform, Vector3[], Vector3 might trigger it? will look at my script again
     
  10. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    @Player7 I still was not able to replicate the errors you're seeing. Transform[], Transform, Vector3[] and Vector3 fields are working fine for me with those settings and Unity version.

    You could try reinstalling Odin and see if it helps.
     
  11. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    Power Inspector 1.3.2 is now available. It doesn't introduce any new exciting features but contains a bunch of bug fixes and small UX improvements.

    Changes:
    • Added ability to add one or more Object references into an Object collection by dragging them onto the header the collection drawer.
    • Added a colored line between split views to separate them visually from each other more clearly.
    • The split view is now automatically unlocked if its contents match the selected targets when you close the main view.
    • You can now begin an Object reference drag from GameObject headers.
    • Prefab instance modification indicators are updated as needed to reflect any changes made.
    • Added Apply and Revert context menu items for drawers of components on prefab instances.
    • Improved reliability of copy-paste operations by also copying over all private fields by default. This fixes copy-pasting for UnityEvents.
    • Other bug fixes.
     
    Gregorik likes this.
  12. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,478

    Latest Odin+ Latest Power Inspector
    ...on the demo scenes of KinematicCharacterController...
     
  13. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    @Player7

    Looking at the error message, it looks to me like the source of your issue is that your project contains a dll that has the UnityEngine.AssemblyIsEditorAssembly attribute but probably does not contain a reference to the UnityEngine assembly.

    Due to this when Odin's custom editor creates an instance of Sisus.OdinSerializer.DefaultSerializationBinder it calls Assembly.GetCustomAttributes for all assemblies in the project, resulting in the TypeLoadException occuring when failing to read said attribute.


    Possible fixes for the issue:

    1. If this is caused by corrupted project files, you could try deleting your Library folder to force all script assemblies and other temporary files to get rebuilt.

    2. If this is caused by a third party dll that has some missing reference, then the dll would need to be rebuilt correctly by its developer.

    3. It looks like in the latest OdinSerializer version they've also added an ad-hoc fix for issues like this by wrapping the Assembly.GetCustomAttributes call inside try-catch. I'll update OdinSerializer to the latest version to integrate this into Power Inspector too. This however won't fix the underlying source of the issue in your project, so it is still recommended your try to fix the real source.
     
  14. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,478
    I'll take a look for that later then it is annoying trying to track down something that is in a dll though :(
     
  15. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    366
    I wonder if the appearance of this division line is supposed to be like this. It feels a little disruptive.
    Unity_AJnRDWtoMm.png
     
  16. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    Definitely not supposed to look like that...

    prefix-resizer.png
     
  17. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    366
    OK so it must be a conflict with another asset I suppose.
     
  18. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    Hmm, it looks like visual issues similar to yours occur if you use the UI Scaling feature found in beta versions of Unity.

    I guess I'll need to start investigating how I can change my GUI code so that everything can be properly rendered with any scaling settings.
     
  19. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    @Gregorik Fixing the UI Scaling glitch wasn't as bad as I thought, only had to build one GUIStyle I was using in various places differently. Everything now seems to function properly with scaling.

    @Player7 I also updated OdinSerializer to the latest version. This should hopefully result in better handling of the TypeLoadException that occurs in your project.

    I'll let you know when the update with these improvements has passed asset store validation.
     
    Gregorik and Player7 like this.
  20. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,478
    haven't seen the asset store update yet.. but still getting them maybe same as other not sure
     
  21. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    Yeah the update is still awaiting approval...

    pending-review.PNG

    I'll try resubmitting the update package before Monday in case it hasn't been reviewed yet due to some sort of bug.
    But it could also just be that this was a busy week for the asset store team.
     
  22. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    302
    The update is now out.
     
    Gregorik likes this.
unityunity