Search Unity

Inspector Gadgets

Discussion in 'Assets and Asset Store' started by Kybernetik, Jun 8, 2019.

  1. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    109
    I thought I was using the most recent version. But to be sure I deleted the package from the project and also from the local cache. Then downloaded it with the Package manager and imported it in the project again. And now the errors are gone.
    I had problems with updating an other package earlier this week. I think Unity 2020.2.2 has a bug in the Package manager.
     
  2. LeRondPoint

    LeRondPoint

    Joined:
    Jan 22, 2021
    Posts:
    10
    @Bezoro
    On Android (Oculus Quest 2), this plugins makes the game crash on launch when activating IL2CPP. Not sure about Windows but it needs to be fixed. My guess is IL2CPP includes the symbols for this plugin even though it's not included in the build. It crashes when loading the MetadataCache.

    Unity version is 2020.3 LTS
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    If you aren't using any Inspector Gadgets stuff in your code, you should be able to prevent any build issues by setting the Runtime DLL (in Assets\Plugins\Inspector Gadgets\Misc\Inspector Gadgets Lite\Runtime) to not be used in any platforms.

    I'll need to look into it and see if I can figure out what the actual problem is.
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    @LeRondPoint I wasn't able to reproduce the exact issue you described, but try extracting the attached DLL into Assets\Plugins\Inspector Gadgets\Misc\Inspector Gadgets Lite\Runtime (to overwrite the existing one) and see if that solves the problem.
     

    Attached Files:

  5. LeRondPoint

    LeRondPoint

    Joined:
    Jan 22, 2021
    Posts:
    10
    Hello, I'm conducting more tests. We had a second plugin which relied on a non-AOT version on Json.Net. Once that is fixed, I'll retry with your plugin active and see what is going on. I will report on the results.
     
  6. LeRondPoint

    LeRondPoint

    Joined:
    Jan 22, 2021
    Posts:
    10
    Hello @Kybernetik ,
    So I managed to fix the problem with Json.Net on that other plugin and I'm still having the problem with your plugin. I tried the attached DLL but it doesn't even build with it. That updated DLL is ~60k versus ~550K for the Asset store version so I think you might have built that wrong. With the Asset store version, app simply crashes at launch in IL2CPP initialization. You would have to change the IL2CPP compialtion to Debug to get a crash call stack.

    Below is a link to a project to repro, make sure to switch the target platform to Android. It includes parts of the Oculus SDK because I'm developing for the Quest 2. I haven't tested with other Android devices so it could theoretically be an Oculus SDK conflict I suppose.

    For now I had to remove your plugin. I was only using it for world transform comparisons of GameObjects in different parts of the hierarchy so I'll be fine without it.

    https://1drv.ms/u/s!AtVjQqdqkuwHg_IKkyWeN5ed3uuf8w?e=Xubaiy
     
  7. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    The editor DLL is ~550k, but the one you need to replace in the Runtime folder is only ~120k. The new one is smaller because it uses different obfuscation settings.

    Would you mind trying it in an empty project with just Inspector Gadgets to confirm that my plugin is actually the source of the problem?
     
  8. HIroLionBld

    HIroLionBld

    Joined:
    Sep 20, 2019
    Posts:
    9
    Hi I bought this asset and now its giving me a lot of errors!
     
  9. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Those last 3 probably have nothing to do with Inspector Gadgets or are simply caused by the earlier errors.

    Can you show me what the first few errors are (with the full message)?

    Also, try right clicking on the Inspector Gadgets folder and doing a Reimport. The way the ScaleDrawer script looks suggests that Unity failed to import it properly for some reason.
     
  10. CreepyD

    CreepyD

    Joined:
    Jun 9, 2019
    Posts:
    24
    I also cannot run on Android (Galaxy S10+) using 2020.2 or 2020.3 with literally a blank project and just adding Inspector Gadgets 6.5.
    Remove Inspector Gadgets, build again, works instantly.
    Game crashes before the splash screen, spent over a week trying to diagnose the cause of this crash because I had nothing to go on lol.
     
  11. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    First, try the new DLL I posted here.

    If that doesn't help, you can use the Android Monitor to directly read logs from your phone since Unity probably won't be able to connect the Console window if the splash screen crashes. It's located in C:\Program Files\Unity\Hub\Editor\2019.4.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\lib\monitor-x86_64 (replace 2019.4.0f1 with your Unity version).
     
  12. CreepyD

    CreepyD

    Joined:
    Jun 9, 2019
    Posts:
    24
    Ok that DLL fixes it yes! Nice one.
     
  13. airoll

    airoll

    Joined:
    Jan 12, 2021
    Posts:
    37
    This worked for me too, thanks so much!
     
  14. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Hey everyone, Inspector Gadgets v6.6 is now up on the Asset Store with that DLL fix and a few other minor improvements and fixes.
     
  15. Bezoro

    Bezoro

    Joined:
    Mar 16, 2015
    Posts:
    133
    Getting a small error:

    SelectionMode.OnlyUserModifiable' is obsolete:
    ''OnlyUserModifiable' is obsolete. Use 'Editable' instead. (UnityUpgradeable) -> Editable


    Unity 2020.3.8f1
    Inspector Gadgets 6.6
     
  16. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    You can just open the script and change it to SelectionMode.Editable. They both have the exact same enum value.

    Oddly, I didn't get any warning in Unity 2020.3.0f1 which means they marked it as obsolete in a minor version update.
     
    ILJI likes this.
  17. Bezoro

    Bezoro

    Joined:
    Mar 16, 2015
    Posts:
    133
    I did. Just letting you know.
     
    Kybernetik likes this.
  18. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    Hi! I just came in to tell you about the .Editable issue in 2021.1.11 but it looks like it is known and being disregarded. I was able to fix it.
     
  19. Abelius

    Abelius

    Joined:
    Nov 11, 2016
    Posts:
    37
    Does someone know if it works with Peek?

    Also, can individual features be disabled to avoid compatibility issues?

    Thanks!
     
  20. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I've never used Peek, but I can't see anything in the description that looks like it would conflict.

    Inspector Gadgets Pro lets you disable features in the Edit/Preferences window and has various scripting define symbols you can use if you want to disable certain Unity Modules to reduce build size. And it comes with the source code so you can always disable anything I didn't think to put in an option for. But there's really no way to know if something will conflict without trying it.
     
  21. Abelius

    Abelius

    Joined:
    Nov 11, 2016
    Posts:
    37
    Thanks for the blindingly fast response. xD I'll give it a try.
     
  22. virtualjay

    virtualjay

    Joined:
    Aug 4, 2020
    Posts:
    68
    This is a fun asset. I'd like to request it handle the paste format of
    (-4.731442f, 4.386703f, -9.400399f)
    though. I find myself often pasting values from code into the inspector, but I have to make a stop and delete all the "f"s off first.
     
  23. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    That's an interesting idea, but I'm not sure if it would be possible without replacing all my float fields with text fields and re-implementing all their float field functionality manually (like value validation and being able to drag the label) which would take a lot of effort and doesn't seem like it would be worth it for something so small.
     
  24. virtualjay

    virtualjay

    Joined:
    Aug 4, 2020
    Posts:
    68
    Maybe I'm misunderstanding something, but I change NullableVector4.TryParse starting at 381 to this:


    var substring = value.Substring(start, comma - start);

    if (substring[substring.Length - 1] == 'f')
    {
    substring = substring.Substring(0, substring.Length - 1);
    }

    if (float.TryParse(substring, NumberStyles.Float, CultureInfo.InvariantCulture, out var floatValue))


    it works.
     
  25. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I was thinking about Ctrl + V directly into the Inspector fields. But yeah, I can add that to the next version for the context menu functions.
     
    virtualjay likes this.
  26. virtualjay

    virtualjay

    Joined:
    Aug 4, 2020
    Posts:
    68
    Thanks! Usually I'm finding that when I need to do this, I'm pasting the whole vector in from code somewhere. So that's my typical use case.
     
  27. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I've implemented it like this instead so it can trim prefixes and suffixes of anything other than numbers:
    Code (CSharp):
    1.                 var digitStart = start;
    2.                 var digitEnd = end;
    3.  
    4.                 // Trim any non-digit prefix as long as it doesn't start with a '.'.
    5.                 var separator = CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator;
    6.                 while (digitStart < digitEnd)
    7.                 {
    8.                     if (digitStart + separator.Length < digitEnd &&
    9.                         string.Compare(value, digitStart, separator, 0, separator.Length) == 0)
    10.                         break;
    11.  
    12.                     var c = value[digitStart];
    13.                     if (char.IsDigit(c))
    14.                         break;
    15.                     else
    16.                         digitStart++;
    17.                 }
    18.  
    19.                 // Trim any non-digit suffix.
    20.                 while (digitEnd > digitStart)
    21.                 {
    22.                     var c = value[digitEnd - 1];
    23.                     if (char.IsDigit(c))
    24.                         break;
    25.                     else
    26.                         digitEnd--;
    27.                 }
    28.  
    29.                 var substring = value.Substring(digitStart, digitEnd - digitStart);
    30.  
     
    virtualjay likes this.
  28. virtualjay

    virtualjay

    Joined:
    Aug 4, 2020
    Posts:
    68
    Also, it's frustrating to right-click on the position/rotation/scale when it's set to World and Copy, only to have it copy the local values. Either it should have a separate menu options for Copy World or it should copy what's shown.
     
  29. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    If you have Inspector Gadgets Pro, go to TransformPropertyDrawer.CopyCurrentValueToClipboard and change the last line to ContextMenuHandler.Copy(DisplayValues.ToVector3());

    Otherwise, I should be done with the Animancer update I'm working on in the next few weeks so I plan on releasing a small Inspector Gadgets update after that.
     
  30. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    @Kybernetik yes please, do the Ctrl + V plus the "copy what is shown" thing, I second those user-friendly updates.
     
  31. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    What I meant was that modifying the way Ctrl + V works for regular fields wouldn't be easy to do.

    The copying what's shown fix will be in the update though.
     
  32. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    AGregori likes this.
  33. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    It's a cool update, though I'm a little disappointed of the lack of actual new features. The asset is great, but there would be endless possibilities to extend it over time.
     
  34. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Feel free to suggest any new features you can think of, but the time I spend developing it is directly proportional to its popularity which is unfortunately very low.
     
  35. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    I understand that most attention goes to Animancer, which is super-innovative and a huge fan favorite.

    I love Inspector Gadgets. Still, perhaps by re-releasing a reinvented version with several features merged in from the likes of Power Inspector, uContext, Peek and NGTools, it would become a popular game changer. I could go into specifics, but it may sound way too ambitious and time-consuming. ;)
     
  36. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    There's no harm in telling me about your ideas, but just copying other plugins and trying to do it better than them is unlikely to gain significant popularity. The reason Animancer is so much more popular than my other assets is because it solves very common problems in a way that nothing else currently available does. But even if Inspector Gadgets had no real competition, it would still need to convince people that its assortment of utilities are worthwhile where Animancer gets to mostly skip that part because people can already see the issues with Animator Controllers.
     
  37. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    (Well, that's exactly what most firms in IT have been doing for decades, starting with Apple & MS & Dell. Also, it's not copying other features, it's unifying them in one killer app or asset.)
    We've been seeing dozens of editor extensions being deprecated precisely because their feature list had been self-limiting. I understand what you mean though, no problem.
     
  38. TigerHix

    TigerHix

    Joined:
    Oct 20, 2015
    Posts:
    69
    For some reason the persist after play mode feature is not working for me. Any ideas?

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. InspectorGadgets.Editor.Serialization+PropertyAccessor.SetValue (System.Object obj, System.Object value) (at Assets/Plugins/Inspector Gadgets/Serialization/Serialization.cs:1095)
    3. InspectorGadgets.Editor.Serialization.SetValue (UnityEditor.SerializedProperty property, System.Object value) (at Assets/Plugins/Inspector Gadgets/Serialization/Serialization.cs:316)
    4. InspectorGadgets.Editor.PersistentValues+<>c__DisplayClass17_0.<SetValues>b__0 (UnityEditor.SerializedProperty property) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:284)
    5. InspectorGadgets.Editor.IGEditorUtils.ForEachProperty (UnityEditor.SerializedObject serializedObject, System.Boolean enterChildren, System.Action`1[T] method) (at Assets/Plugins/Inspector Gadgets/Misc/IGEditorUtils.cs:1058)
    6. InspectorGadgets.Editor.PersistentValues.SetValues (UnityEngine.Component component, System.Object[] values) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:282)
    7. InspectorGadgets.Editor.PersistentValues.SetValues (UnityEngine.Object obj, System.Object[] values) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:252)
    8. InspectorGadgets.Editor.PersistentValues+<>c__DisplayClass13_0.<Initialize>b__0 (UnityEditor.PlayModeStateChange change) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:204)
    9. UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at <01e901910c5242498b7e69f6d2d8d500>:0)
    10.  
     
  39. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    What field are you trying to use it on?
     
  40. TigerHix

    TigerHix

    Joined:
    Oct 20, 2015
    Posts:
    69
    I was persisting Transforms.
     
  41. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    In Serialization.cs go to the method
    public virtual void SetValue(object obj, object value)
    and change the if in the middle to:
    Code (CSharp):
    1.                 if (field is null ||
    2.                     obj is null)
    3.                     return;
     
    TigerHix likes this.
  42. TigerHix

    TigerHix

    Joined:
    Oct 20, 2015
    Posts:
    69
    That worked! Thanks.
     
  43. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. InspectorGadgets.Editor.Serialization+PropertyAccessor.SetValue (System.Object obj, System.Object value) (at Assets/Plugins/Inspector Gadgets/Serialization/Serialization.cs:1095)
    3. InspectorGadgets.Editor.Serialization.SetValue (UnityEditor.SerializedProperty property, System.Object value) (at Assets/Plugins/Inspector Gadgets/Serialization/Serialization.cs:316)
    4. InspectorGadgets.Editor.PersistentValues+<>c__DisplayClass17_0.<SetValues>b__0 (UnityEditor.SerializedProperty property) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:284)
    5. InspectorGadgets.Editor.IGEditorUtils.ForEachProperty (UnityEditor.SerializedObject serializedObject, System.Boolean enterChildren, System.Action`1[T] method) (at Assets/Plugins/Inspector Gadgets/Misc/IGEditorUtils.cs:1058)
    6. InspectorGadgets.Editor.PersistentValues.SetValues (UnityEngine.Component component, System.Object[] values) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:282)
    7. InspectorGadgets.Editor.PersistentValues.SetValues (UnityEngine.Object obj, System.Object[] values) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:252)
    8. InspectorGadgets.Editor.PersistentValues+<>c__DisplayClass13_0.<Initialize>b__0 (UnityEditor.PlayModeStateChange change) (at Assets/Plugins/Inspector Gadgets/Serialization/PersistentValues.cs:204)
    9. UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at <33fb8f3984d146e083d756d969c06738>:0)
    I'm having problem with Persist After Play mode. Any idea what's happening? It worked once and then subsequent uses in the same scene are bugging out.
     
  44. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Replace your Assets\Plugins\Inspector Gadgets\Serialization\Serialization.cs with the attached file. I might have already fixed that issue.

    If that doesn't help, what are you trying to persist?
     

    Attached Files:

    MyOwnGames likes this.
  45. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    @Kybernetik I have a small feature suggestion If possible. Could you include an Inspector "ping object" feature in one of the upcoming updates? So if you click on the Transform component, it would ping the gameobject in the Hierarchy?
    Small but powerful. Thanks for considering it.
     
  46. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    That could easily be done using a context menu function on the Transform component:
    Code (CSharp):
    1.         [MenuItem("CONTEXT/Transform/Ping Object")]
    2.         private static void PingObject(MenuCommand menuCommand)
    3.         {
    4.             EditorGUIUtility.PingObject(menuCommand.context);
    5.         }
    Just put that in any script and right click the Transform component header.

    I don't think it would be useful often enough to be worth showing in the Transform Inspector itself.
     
  47. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
  48. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    Probably better off calling it 6.71 then instead.
     
  49. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    If the changes were too minor to even increment the minor version number, it wouldn't be worth the time it takes to upload to the store. 3 tiered semantic versioning serves no real purpose unless you're releasing regular builds with just bug fixes and no changes.
     
  50. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    True. I wrote a 5 star review on Inspector Gadgets years ago, and it'll always be a 5 star asset. I just wish you'd introduce exciting new features -- but I understand it's not really worth your time due to its low visibility. ;)
     
    Kybernetik likes this.