Search Unity

Utilities Script Inspector 3

Discussion in 'Tools In Progress' started by Flipbookee, Aug 10, 2013.

  1. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Well no, Si3 doesn't compile the scripts. That's still done by Unity's built-in compiler. So no, I cannot change that as it isn't related to Si3 at all. :)

    There's one part of that which actually I can improve - after a successful compile, Unity reloads the old and the newly compiled assemblies, and right after that Si3 needs to reinitialize itself. That reinitialization used to take a couple of seconds on my laptop (when running on battery in energy-saving mode) and I improved that a lot, so now it takes about half a second only. This improvement hasn't been released yet because I also started working on code folding, which turned out to be a huge change and I'm still working on that. I've made a lot of progress on the code folding feature though, so I hope to finish it very soon and then release all these improvements.
     
  2. Minzie

    Minzie

    Joined:
    Jul 26, 2019
    Posts:
    77
    Can you try to amend current script exist in your project? Don't create new script. It works fine if I create new script, but error occurs if include "using Cinemachine" namespace in any existing script.
    No, the project can't compile at all. The error keeps showing in console log there & I can't enter playmode.
    I've been trying to recreate this error in new project. But after my workaround, I can't find the errors anymore. What I've done: I uninstalled & reinstalled VS community 2022 in my laptop & SI3 from the package manager. Click "regenerate project files" & select the external script editor as VS 2022 in preferences-> external tools. At this time, error still there. So instead of amending the current script I have (any script), I create new script & copy all the current script to the new script. At this time, no more error when I use Cinemachine namespace. After closing Unity editor & restarting laptop several times, it seems no more error even if I amend current script to include Cinemachine namespace. I'm not sure why..
     
  3. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Yeah, I tried both with a newly created script and with the existing ones, and it works. Although, once a script is created it becomes an existing script right away, so there is not much difference between the two. The only difference between those scripts I could think of might be the folder in which they exist, which could be significant in your case as that in Unity defines into which of the project's assemblies each script will be compiled, and different project assemblies would compile referencing a different set of other assemblies. Si3 takes that into account, same as the compiler, so both the compiler and Si3 would report errors for any code that tries to use a namespace defined in a non-referenced assembly. That's a bit too complicated for me to explain in a single post like this, but I'd recommend reading Unity Documentation on that topic and its subtopics from here: https://docs.unity3d.com/Manual/script-compilation.html

    Okay, then you have to fix the compile errors. Please read and understand the link to Unity Documentation about script compilation and assembly definitions I gave you above. If the script with compile errors is part of an assembly defined by an "assembly definition", you may have to manually add a reference to Cinemachine in that assembly definition.

    No, don't do that, it won't help. If there are compile errors in your script, you'd have to fix them. The compile errors won't fix magically on their own - you have to do that.

    Now I'm not sure, did the compile errors go away in your project or you couldn't reproduce the errors in the new project? If you still get compile errors, send me the Editor.log file and I'll try to help you.
     
  4. qmqz

    qmqz

    Joined:
    Jan 25, 2013
    Posts:
    21
    Hey, I'm not certain if I overlooked something, but is there a way to keep the opening brace on the same line? I've already tried the settings in Preferences, and even editing the code snippets, but it doesn't change anything. Any time I create a new class, it'll still use opening braces on new lines in start, update and the namespace.

    Also neither of the Magic Methods checkboxes change anything, as I still get comments for Start and Update.
    Unity 2021.3.12f1

    Thank you.
     
    Flipbookee likes this.
  5. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey @qmqz, I guess you figured this out by now - here's the option that moves the opening brace to a new line that you prefer to turn off:

    upload_2022-11-17_10-43-19.png

    It's the last tickbox at the end, the highlighted one - just turn it off.

    And thank you so much for your awesome review :) and the feedback, which is always much appreciated and taken seriously.
     
  6. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I just checked this too and it seems to work fine for me. Can you tell me more about what happens in your case?
     
  7. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    A quick update about the Code Folding upcoming feature - this is where it stands right now:

    Si3-code folding.gif

    There is still some work left with that, but the most complicated changes are done now :)

    But it took me several months to get this working in Si3. It required a crazy amount of changes so far. The feature looks very innocent, but in fact, it's an evil one! Folded code changes everything in the code view - text layout and rendering, keyboard handling, mouse clicks, positioning of popups, rendering selections and other text highlights, word wrapping, and whatnot else... I almost regret starting work on this, but I'm proud of the progress :p
     
  8. imblue4d

    imblue4d

    Joined:
    May 27, 2016
    Posts:
    110
    Hi i noticed that when using Script inspector in a project using HDRP, .shadergraph assets are opened as text when double-clicked, instead of being opened by the shader graph editor

    The only workaround i found for this is to disable shader opening like this:
    upload_2022-12-10_20-16-23.png

    But this will disable opening other shader files,

    Is it possible to exclude .shadergraph files from the rest please? they're basically just serialized objects,
    upload_2022-12-10_20-18-20.png
    so no one would need to edit them by hand
     

    Attached Files:

    ClearRoseOfWar and Flipbookee like this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Right, someone alerted me about that and I fixed it for the next release, so .shadergraph files will open in the shader graph editor.

    In the meantime, the easiest workaround is to hold down Ctrl on PC or Cmd on Mac while opening the file, which temporarily inverts the Si3 settings for whether to open a shader in Si3 or in Unity’s default editor, which in this case is the shader graph editor.
     
    imblue4d likes this.
  10. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    I have a situation where need to look at a large script and refactor something, since there is no way to have two windows open of the same script, so I need to scroll up and down and find the place each time.
    Maybe there is a way you can make a merge / diff window that has the same script 2 times open?
     
    Flipbookee likes this.
  11. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    You can open the same script in as many windows as you want with this button:

    49B80DCF-2DD5-49D4-8ACD-936DFF3FC06F.jpeg

    And then put them side by side, if that’s what you mean?

    Although, I’d do that in a single window and use a lot of Alt+Left and Alt+Right arrow keys to move back and forth between the two (or more) distant locations. Those are the two buttons with arrows right below the one I highlighted above. Or the 4th and 5th mouse button - those two do the same :cool:
     
  12. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Thank you thats what I needed, little did I know it was already right in front of me :)
     
    Flipbookee likes this.
  13. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Is there any way to have per-project Si3 preferences?

    I have just one project on a team that, contrary to all that is natural and holy, insists that we indent with spaces instead of tabs.

    But that means I have to remember to go to Preferences and toggle the "Insert Spaces on Tab" checkbox whenever I switch between this project and a sane one. And sometimes I forget.

    Is there any way to have a settings file in the project itself, which will override global preferences for this?
     
    Flipbookee likes this.
  14. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @JoeStrout, I see what you mean - indenting with spaces must be a pain... But you know me, I wouldn't let a friend suffer like that for long ;)

    I think I will add "settings profiles" shared among all projects, and then let each project select its own profile. That would be a bit easier for me, but having files that override the setting would still be nice to have especially if they work for the containing folder and its subfolders.

    For now, I think you should change the prefix constant string at line 26 in my SISettings.cs for your odd project only:
    upload_2022-12-25_9-59-39.png

    Doing that would revert all Si3 settings to their default values only in that project, but then you could set them to anything you want and they won't interfere with your other projects. :)
     
    JoeStrout likes this.
  15. ClearRoseOfWar

    ClearRoseOfWar

    Joined:
    Sep 6, 2015
    Posts:
    89
    Really appreciate the work you put into this ide. Just wondering about a release date for collapsing.
     
    Flipbookee likes this.
  16. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks @ClearRoseOfWar! :)

    I was going to reply "possibly the end of next week" when you posted that, but now, a few days later, I think that was too optimistic. I may have something ready for testing by the end of next week, but not ready for release yet. I know you're very keen to get the code folding feature, so I hope it'll be okay if I send you a copy to help me test that and shorten the time from then to the actual release date.
     
  17. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    Was just getting into Unity again a bit after many years, wanting to try out the new DOTS stuff, but I've since switched to Linux (NixOS) and was having trouble setting up VSCode properly, and then remembered this. Really happy this is still alive and well, which makes sense because it's a really cool tool!
     
    xucian and Flipbookee like this.
  18. vith47

    vith47

    Joined:
    Dec 31, 2020
    Posts:
    1
    Hi, I need help, how can I do this using SI3? Thanks a lot! upload_2023-4-6_22-2-5.png
     
    Flipbookee likes this.
  19. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hi @vith47! You cannot do that currently, the implement interface feature is not implemented yet Si3. That’s on my to-do list, and it’s been there for too long, so let me see what I can do about this now and I’ll let you know.
     
    vith47 likes this.
  20. unity_A0HrN8vE0XQ8Gw

    unity_A0HrN8vE0XQ8Gw

    Joined:
    Sep 8, 2018
    Posts:
    4
    I really love SI3! I use it a ton. Really looking forward to code folding. Are you still chipping away at it? Any updates?

    Keep up the good work!
     
    Flipbookee likes this.
  21. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    probably folded in a drawer somewhere, been at it for year(s)?
     
    Flipbookee likes this.
  22. unity_A0HrN8vE0XQ8Gw

    unity_A0HrN8vE0XQ8Gw

    Joined:
    Sep 8, 2018
    Posts:
    4
    He has a post from December where it looks functional (but he says it still needs work). So if he's found much time to work on it in the meantime it may be ready or nearly there.

    It's pretty impressive how long he's supported this. Just this thread is ten years old. And while he does go months with no updates here, he does consistently return. His last post was Thursday. I have a lot of Unity assets that have fallen into disrepair and are no longer functional. So I really appreciate his continued effort here. Especially considering there's really no other good options if you don't want to or can't use Visual Studio. I was using Notepad++ prior. The QOL of SI3 is so much nicer.

    While, it's possible that this feature is stuck in Neverland, I have faith! Sometimes slow and steady wins the race.
     
    Flipbookee and zKici like this.
  23. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hehe - "folded in a drawer somewhere"? No man, I'm still working on it! :)

    I made a lot of progress recently and it doesn't look desperately far from finishing anymore. I already said that the complexity of this feature surpassed my worst expectations, and I can say now that it surpassed even that as well, but I'm very happy now that it's all so close to fully working. The most complex parts are solved and I only have to finish some of the "easy" polishing parts.

    Over the weekend, I made it possible to move lines with some parts of the code folded in them (using Alt+Up/Down arrows). That actually moves the whole block of folded code by one line up or down. And in fact, if the line above or below also contains some folded code, this moves the lines before or after that whole code block. There is one remaining issue that I faced with that - while moving the lines up and down, the folded blocks of code remain folded after the move, but not if I undo the move which is because of the way how undo/redo works in Si3 - it records removing and inserting text but it doesn't record which parts of that text were folded. I think I'll leave that like it is for now because I have a feeling that the right solution might take too much time.

    I even found some time to check again the performance after these changes, and it hasn't changed much, although I found a couple of "low-hanging fruits" that I want to address.

    Thank you all for your continued support! It means a lot to me :)
     
  24. abotrix

    abotrix

    Joined:
    Oct 21, 2015
    Posts:
    20
    I was wondering how to update the SI3 in my project. I downloaded latest version but it says:

    upload_2023-7-10_16-21-12.png

    Do I have to delete the old one?

    Thanks..
     
    Flipbookee likes this.
  25. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Flipbookee likes this.
  26. ElevenGame

    ElevenGame

    Joined:
    Jun 13, 2016
    Posts:
    146
    Hey @Flipbookee just wanted to let you know that on Unity 2023 Versions (Win10) the Window and Text rendering of Script Inspector seems broken. There is an extra window bar with x-Button on top and Text looks as though it had extra tab characters within. I continue with LTS Unity version for now, but maybe you can look into it. Since no one else mentioned it yet, I guess it would be interesting to know, if it is just a change in how Editor Windows work in 2023 or something related to my Setup/System..
     
    Flipbookee likes this.
  27. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    There's only one must-fix bug for the release (somehow, I broke the code for handling generic methods), so I hope I'll fix that and release a new version this weekend. And it will include a nice workaround for the bug in Unity 2023 that breaks text rendering, as @ElevenGame mentioned. And I'll check that extra window bar as well, which I didn't notice, so thanks for reporting that!
     
  28. Triunvirato

    Triunvirato

    Joined:
    Mar 9, 2019
    Posts:
    5
    Where is it my good man, I've been waiting for this update for decades...

    Also, if you could answer, are you thinking about implementing code refactoring (such as renames, method extraction, the good stuff) in the near future (next-next update?) thanks again for this amazing piece of software. I just want to get rid of rider entirely (it uses too much ram and is too slow compared to SI3)
     
    Flipbookee likes this.
  29. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I fixed one part of the bug I mentioned, but I'm still working on the rest of it. I'm not sure yet, I may decide to release without fixing the rest of it as it isn't that bad now after it's been half-fixed. I'll give it another push today to see if I can make some more progress quickly, and if not it will remain like this until the next patch release.

    Yes, the plan was always to add all that good stuff to Si3 as well.
     
    Lars-Steenhoff likes this.
  30. emosia

    emosia

    Joined:
    Feb 19, 2013
    Posts:
    11
    After typing a variable name followed by a dot (.), it adds an extra space. Any suggestions on how to fix this? (Screenshot attached). Thanks
    upload_2023-7-30_11-16-32.png
     

    Attached Files:

    Flipbookee likes this.
  31. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Yes, that's a new bug in Unity 2023 related to measuring text size. I've found a workaround and released it with all the other changes a few days ago, so please update your Si3 :)

    Here are the release notes:

    Script Inspector 3
    version 3.1.0

    is available on the Asset Store
    New in version 3.1.0:
    - IMPORTANT FIXES:
    * Workaround for Unity 2023 bug in measuring text size
    * Updated toolbar search box for Unity 2023.1.1+
    - Code folding for C# regions
    - Integration with the Unity Profiler window:
    * Opening C# methods in Si3 by double-clicking them in the CPU Module recordings
    - Support for newer C# language specs:
    * Switch expressions
    * Local functions
    * Index and Range operators
    - Four times faster parsing and C# code analysis
    - Adjustable spacing between text lines
    - Opening Unity Style Sheet .uss files as plain text assets
    - New color theme: Base16 Tomorrow Dark - thanks @f00dstamp
    - Fixed async lambda expressions - thanks @zeiksz
    - Fixed interpolated strings in code snippets - thanks @zeiksz
    - Fixed an issue with a blinking popup on reloading the assemblies
    - Fixed IndexOutOfRange exception in FGTextBuffer.GetTokenSpan method
    - Many other minor fixes and improvements...

    I hope you like it and enjoy coding in Unity like never before! And if you do, please post a nice review if you haven't done that yet - it would mean the world to me :)
     
    Last edited: Aug 31, 2023
    ElevenGame, AleaG and Lars-Steenhoff like this.
  32. Darkhitori

    Darkhitori

    Joined:
    Jan 7, 2015
    Posts:
    16
    Since the new update i'm getting this in 2022.37f1. this error keeps occurring :

    ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    Parameter name: length
    System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <b89873cb176e44a995a4781c7487d410>:0)
    ScriptInspector.CharSpan.GetString () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGParser.cs:891)
    ScriptInspector.FGListPopup.Create (ScriptInspector.FGTextEditor editor, UnityEngine.Rect buttonRect, System.Boolean flipped) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGListPopup.cs:439)
    ScriptInspector.FGTextEditor.Autocomplete (System.Boolean suggestionsOnly) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:8320)
    ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (System.Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2457)
    ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2238)
    ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1549)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <97436df440ca462884c5332c1d8ebbe7>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <97436df440ca462884c5332c1d8ebbe7>:0)
    UnityEditor.DockArea.OldOnGUI () (at <97436df440ca462884c5332c1d8ebbe7>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.CallbackEventHandler.UnityEngine.UIElements.IEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <9d7fc877145d4138982bf12cdd3484c6>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <aa75c951dea44e839ed36863e532f0e2>:0)
     
    Flipbookee likes this.
  33. Darkhitori

    Darkhitori

    Joined:
    Jan 7, 2015
    Posts:
    16
    and also greys out the SI tab that i'm coding in!!!
     
    Flipbookee likes this.
  34. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks for reporting this! I'm on it right now...
     
  35. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I managed to reproduce the issue, so I hope the fix will be available ASAP.
     
    Lars-Steenhoff likes this.
  36. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Okay, I fixed that and just updated Si3 on the Asset Store. Please update to get the fix!
    It was something related to the Si3 setting in Preferences to insert spaces by typing the Tab key...

    Script Inspector 3
    version 3.1.1

    is available on the Asset Store

    The list of changes is short, of course :rolleyes:

    New in version 3.1.1:
    - CRITICAL FIX: ArgumentOutOfRangeException on auto-indenting code indented with tabs when Si3 is set to indent with spaces - thanks @Darkhitori
    - Allowed editing text-based files even in WebGLTemplates and other special Unity folders - thanks @JGameMaker92
    - Allowed opening assets of type DefaultAsset in new SI tabs by drag-dropping them or from the Inspector

    I hope you don't mind me updating it this soon, but I had no choice, really...

    Happy coding! :cool:
     
    ElevenGame and Lars-Steenhoff like this.
  37. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Has anyone tried the new Profiler integration in Si3 already? :rolleyes:

    upload_2023-8-15_7-17-6.gif
     
    blacksun666 and Lars-Steenhoff like this.
  38. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527

    Looks to be a time saver! Haven’t used it yet as I did not know it was there :) , thanks for showing it!
     
    Flipbookee likes this.
  39. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    A HUGE shoutout to @zeiksz for helping me identify, fix, and test so many bugs in Si3!

    The result is a new release :cool:

    Script Inspector 3
    version 3.1.2

    is available on the Asset Store

    This is what has changed:

    - Support for InternalsVisibleTo assembly attribute - thanks @zeiksz
    - Support for variable reference types from Reflection - thanks @zeiksz
    - Fixed opening MonoBehaviour scripts by drag-dropping Game Objects onto SI tabs
    - Fixed keyboard handling in the search box
    - Fixed printing generic type names in tooltips
    - Fixed autocompletion on typing a dot right before another dot character
    - Fixed extension methods extending any type by targeting a type parameter
    - Fixed inference of generic method's type arguments from delegate parameters and lambda expressions - thanks @zeiksz
    - Fixed resolving method groups used as arguments to parameters of delegate type - thanks @zeiksz
    - Fixed referencing assemblies with non-ASCII character names - thanks @zeiksz
    - Fixed smart semicolon placement while accepting a completion - thanks @zeiksz
    - Fixed resolving the type of implicitly typed parameters of a lambda expression used as a method's named argument - thanks @zeiksz
    - Fixed parsing the readonly accessor modifier

    I hope you'll enjoy coding in Unity with Si3 even more now, and of course, like never before! So, let me know :)
     
    AleaG and Lars-Steenhoff like this.
  40. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,445
    I'll be updating as soon as I can. Just wondered if you looked into that pre-save hook we mentioned some weeks ago, so you can untabify or strip trailing whitespace or other tasks. I tried in the prior release; although I could make the changes to the lines as they were saved I could not refresh the text-styled line data so the changes would be visible in the editor after.
     
    Flipbookee likes this.
  41. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    No @halley, I didn’t, sorry. I had to get all the big changes released first, and now I’m trying to fix all the important bugs as they get reported, but I’ll get to that very soon. There’s one more bug in the arguments hint tooltip for extension methods that I have to fix, and then I can get back to all the small requests or even the larger ones.
     
  42. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,445
    No worries, I expected you've been quite busy with all the other things listed. I don't know your personal method of task list management, so I was just selfishly bumping it in your mind.
     
    Flipbookee likes this.
  43. Darkhitori

    Darkhitori

    Joined:
    Jan 7, 2015
    Posts:
    16
    Another error in 2022.37f1.

    NullReferenceException: Object reference not set to an instance of an object
    ScriptInspector.CsGrammar+Scanner.OnReduceSemanticNode (ScriptInspector.ParseTree+Node node) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/CsGrammar.cs:3542)
    ScriptInspector.FGGrammar+Rule.NextAfterChild (ScriptInspector.FGGrammar+Node child) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGGrammar.cs:3720)
    ScriptInspector.FGGrammar+Seq.NextAfterChild (ScriptInspector.FGGrammar+Node child) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGGrammar.cs:3066)
    ScriptInspector.FGGrammar+Many.Parse () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGGrammar.cs:2502)
    ScriptInspector.FGGrammar+Parser.ParseStep (ScriptInspector.FGGrammar+IScanner scanner) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGGrammar.cs:3385)
    ScriptInspector.FGGrammar+Parser.ParseAll (ScriptInspector.FGGrammar+IScanner scanner) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGGrammar.cs:3336)
    ScriptInspector.CsGrammar.ParseAll (ScriptInspector.CsGrammar+Scanner scanner) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/CsGrammar.cs:2658)
    ScriptInspector.CsParser.ParseAll (System.String bufferName) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/CsParser.cs:109)
    ScriptInspector.FGParser.OnLoaded () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGParser.cs:1093)
    FGTextBuffer.ProgressiveLoadOnUpdate () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:875)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <97436df440ca462884c5332c1d8ebbe7>:0)

    .
     
    Flipbookee likes this.
  44. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I think I fixed it, I’ll send you a copy if you could test it… It was something related to parsing partial classes, sorry about that!
     
  45. Darkhitori

    Darkhitori

    Joined:
    Jan 7, 2015
    Posts:
    16
    The Fix worked haven't seen the error since!!!
     
    Flipbookee and Lars-Steenhoff like this.
  46. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Excellent! Thanks for testing it :)

    So, there will be another release tomorrow with a bunch of other fixes…
     
    Lars-Steenhoff likes this.
  47. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    That “tomorrow” didn’t come yet :oops: just to let you know… There’s one really annoying bug in autocomplete when you type a . character right before another . which I hoped I fixed in 3.1.2 but apparently I didn’t. These last few days, I tried to fix that in two other ways, and I failed, but I found the right way just yesterday and I’m still working on finishing that up. The new update will come right once I finish this, maybe today, maybe tomorrow, hopefully not later than Wednesday. So, stay tuned!
     
    ElevenGame likes this.
  48. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey folks, here's the new release :D

    Script Inspector 3
    version 3.1.3

    is available on the Asset Store

    It's all about bug fixes and QoL improvements only. This is what has changed:

    - IMPORTANT FIXES:
    * NullReferenceException on parsing partial classes - thanks @zeiksz & @Darkhitori
    * NullReferenceException on auto-indenting with spaces - thanks @zeiksz
    * Workaround for Unity bugs in AssetDatabase with non-ASCII letters in asset paths - thanks @zeiksz
    * Better fix for autocomplete on typing a dot right in front of another dot character
    * Fixed tooltips stealing focus from code view on Linux - thanks @Leeonidas300
    - Updated parsing console log entries in newer Unity versions when Stack Trace Logging is set to "Full"
    - Improved argument hints for extension methods
    - Fixed autocomplete after "new" for generic types with tuple type arguments - thanks @zeiksz
    - Fixed resolving methods with tuples as type arguments - thanks @zeiksz
    - Fixed generic user-defined implicit conversion operators - thanks @zeiksz
    - Fixed C# grammar for local functions of type void - thanks @GrassWhooper
    - Fixed implicit identity conversion of tuple types
    - Fixed conversion of value types to nullable types
    - Fixed validation of null literals and tuple types
    - Fixed field type of tuple expressions with null literals
    - Speculative fix for opening the same script in separate tabs when double-clicking log entries - thanks @crafTDev

    Go, get it, and enjoy coding in Unity like never before! :cool:
     
    GrassWhooper likes this.
  49. GrassWhooper

    GrassWhooper

    Joined:
    Mar 25, 2016
    Posts:
    109
    Looks fantastic :D thanks for the very quick bug fix
    sorry for the trouble, i noticed something else, kinda.

    i have this code in my monobehavior
    Code (CSharp):
    1.         List<Func<GameObject,bool>> tests = new List<Func<GameObject, bool>>();
    2.         foreach (ICharaActionAdv a in actions)
    3.         {
    4.             tests.Add((go)=>!go.activeInHierarchy);
    5.         }
    i keep getting "unkown symbol" and when i write go. i get no autocompletion for anything related to game objects
    just thought i'd mention it, and thanks for the very quick updates :D
    upload_2023-9-7_12-44-54.png
     
    Flipbookee likes this.
  50. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hmm, interesting… I’ll check that, thanks!
     
    GrassWhooper likes this.