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

Script Inspector 3 - World's Fastest IDE for Unity

Discussion in 'Assets and Asset Store' started by Flipbookee, Jun 2, 2012.

?

What would you like to see in the next update?

Poll closed May 17, 2018.
  1. Line numbers

    140 vote(s)
    36.9%
  2. Code folding

    234 vote(s)
    61.7%
  3. More color schemes

    43 vote(s)
    11.3%
  4. Customizable color schemes

    71 vote(s)
    18.7%
  5. Search functionality

    152 vote(s)
    40.1%
  6. Lower price :D

    104 vote(s)
    27.4%
  7. No thanks, it's fine as it is :)

    11 vote(s)
    2.9%
Multiple votes are allowed.
  1. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    @h00w Yes, you can type Chinese characters, but currently they’ll render incorrectly in the view because Si3 assumes the width of all characters is equal, while Asian characters are wider and they may overlap with some other text in the line. I can fix that, just it isn’t a trivial fix and that’s why it hasn’t been fixed yet. But I know this is an issue for all my Asian friends, so I’ll focus on getting this fixed sooner!
     
  2. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Some bad news, man, not really sure if reported or not. I have no idea but maybe some try-catch help?

    I have some binary assets (ending with .bytes). SI3 might have assumed that those files are UTF8-Encoded so lead to reading errors?

    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. FGTextBuffer.FormatLine (Int32 currentLine) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:2647)
    3. FGTextBuffer.ReformatLines (Int32 fromLine, Int32 toLineInclusive) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:2633)
    4. FGTextBuffer.ProgressiveLoadOnUpdate () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:712)
    5. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:249)
    6.  
    Code (CSharp):
    1. Could not read the content of 'Assets/_Art/Resources/ab/4afd1de53a4388053c514c5d14834ae2.bytes' because of the following error:
    2. UnityEngine.Debug:LogError(Object)
    3. FGTextBuffer:ProgressiveLoadOnUpdate() (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:689)
    4. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    Code (CSharp):
    1. System.ArgumentException: Arg_InsufficientSpace
    2. Parameter name: chars
    3.   at System.Text.UTF8Encoding.InternalGetChars (System.Byte* bytes, Int32 byteCount, System.Char* chars, Int32 charCount, System.UInt32& leftOverBits, System.UInt32& leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x00093] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:797
    4.   at System.Text.UTF8Encoding.InternalGetChars (System.Byte[] bytes, Int32 byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex, System.UInt32& leftOverBits, System.UInt32& leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x0010b] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:744
    5.   at System.Text.UTF8Encoding+UTF8Decoder.GetChars (System.Byte[] bytes, Int32 byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex) [0x00004] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:1114
    6.   at System.IO.StreamReader.ReadBuffer () [0x000bf] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:358
    7.   at System.IO.StreamReader.ReadLine () [0x000e5] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:484
    8.   at FGTextBuffer.Parse (Int32 parseToLine) [0x0014f] in /Volumes/Data/Kame/BC3D/Client-bcid-android/Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:1972
    9.   at FGTextBuffer.ProgressiveLoadOnUpdate () [0x0004c] in /Volumes/Data/Kame/BC3D/Client-bcid-android/Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:685
    10. UnityEngine.Debug:LogError(Object)
    11. FGTextBuffer:ProgressiveLoadOnUpdate() (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:690)
    12. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
    syscrusher and Flipbookee like this.
  3. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Right, I see... I’ll check what’s going on. Sounds like Unity has imported those binary assets as TextAsset and then that bug in the Mono libraries kicks in.

    This is great help, thanks @thienhaflash!
     
  4. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Hi... I've been using SI3 for a long time now, and It is great... I have two questions.

    1.- Could it be possible to add the functionality so when I press the "Insert" Key on my keyboard, I can Write over previous text? instead of adding text.

    2.- I would like to have a custom color Scheme with special behaviour for coloring some things... could it be possible for me to modify something so I can have custom behaviours? for example, I would like the "false" in Red and "true" in green or something like that, instead of the default bool color (can you give me some advice on what scripts to change).
     
    Flipbookee likes this.
  5. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    YAY!!! Thanks :cool:

    Please consider giving it your stars rating, or if you're feeling extra kind today, maybe even post a review ;)

    Yes, I can add that. The reason it hasn't been added so far is because I haven't found that function useful for anything (in the last 35 years!!!) other than to annoy me when I press it accidentally :p but yeah, it's easy to add that if you think it may be useful for something.

    That should be fairly easy to add - I'll check and I'll let you know...
     
    daville likes this.
  6. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Hey people, I just wanted to inform you quickly about the recent progress with the Rename Refactoring feature and upgrading Si3 to version 3.1:

    The initial implementation started working some time already, but it wasn’t perfect because it was renaming all the references to the symbol being renamed “blindly”, i.e. without verifying the results of that change. That could potentially lead to compile errors if the newly assigned name to a symbol clashes with another name in the scope of the reference to the renamed symbol, so that’s why a true rename would also verify that no such issues get introduced accidentally while renaming.

    So I started working on that part as well, but that verification proved to be a bit more complicated than I thought, so it took a bit longer than I expected, but it’s done now and seems like it's working as expected. It will need a bit more testing before it gets released for everyone and I may need some of you to help me with that. It will e great if I can count on a couple of volunteers for that part, so please let me know if you’re interested in participating :)

    Thanks!
     
  7. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    Since I was one of those asking for this feature, count me in as a beta tester if needed. I have just completed a fairly small project that I could easily and safely clone into a test bed, so even if at worst case SI3 beta totally "ate" my project, no harm done. :)
     
    Flipbookee likes this.
  8. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Came here after seeing 2018 is dropping support for Mono. Noticed people were complaining about Visual Studio and Community being unreliable and bloatware and also that Rider is too pricey and is now subscription based.

    One of the comments praised your plugin and apparently so is the rest of the world ahaha.
    I might be in the neighborhood soon for a new IDE so I have some questions to ask:

    1. Will plugin go on sale anytime from now to the next couple months?
    2.Since plugin is part of the project will it also be assembled into the final build causing unnecessary bloat?
    3.Is there any important details I should know before planning a purchase?
     
    Last edited: Jun 28, 2018
    Flipbookee likes this.
  9. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    You will need VS for debugging anyway.
     
    Flipbookee likes this.
  10. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Are you saying Script Inspector has no debugging at all?
    Does it at least support the debug.log feature that mono had?
     
    Last edited: Jun 28, 2018
    Flipbookee likes this.
  11. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    ScriptInspector absolutely does support Debug.Log() and related functions -- they work in SI3 just as they do otherwise. It also works very well with Squiggle, which is a third-party asset that I use which basically puts a chart recorder into an alternate console window, to graph the values of floating point or integer types over time. It's really handy, and I highly recommend it.

    What SI3 does not provide is breakpoints and statement-level single step execution.

    Personally, I rarely even use VS for those functions, because I find Squiggle can give me a different viewpoint on essentially the same information -- what are my variables doing over multiple frames and over time? Personal preference -- I have nothing against VS, but I just find I don't need it very often.
     
  12. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    1. No one but @Flipbookee and the Asset Store team can answer that, so no comment. :)
    2. No, it will not be part of your final project. It's in the special folders that Unity automatically excludes from builds, so this exclusion is completely automatic. It "just works".
    3. If you do buy SI3 -- and I'm one of those who absolutely recommends it -- take the time to look at the editor preferences for SI3 once you've installed it. There are a lot of things you can customize to your preference. Also, you will find that if you have SI3 windows open in one project, then you open another project where SI3 is not installed, you'll get a harmless warning in the Unity editor at startup. This can be safely ignored and only happens as you first start Unity for the project without SI3. Honestly, you'll probably find you put SI3 into every project, so this will rapidly become a non-issue, but if you see the message don't panic. :)
    Hope this helps!
     
    Flipbookee and SilverStorm like this.
  13. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Hey,

    I touched based with you a while ago about using this in a custom editor. Any progress? If you dropped the feature we discussed, do you have any ideas on how to make the following more readable? Is there any way to change the color/bold/italic of individual words in EditorGUILayout.TextArea?

    Our editors are working great, but I wish the code was a bit more readable (let alone code completion, etc).

    editorcode.PNG
     
    Flipbookee likes this.
  14. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Hey @DGordon, no I didn't drop the idea. I'll still need the embedding to be able to add the Immediate Window as I was planning...

    Yes, you can format the text in a TextArea. This explains how to do that: https://docs.unity3d.com/Manual/StyledText.html

    I use a different method in Si3, so I can't tell you how good or bad is that... However, the issue is not trivial. Adding style to individual words is easy, finding out what style to apply to each word is a bit more difficult, unless you want to do that in a simplified way where the styled words are predefined. Even then, you'd have to identify the beginning and the end of a string and skip the styling for words appearing inside the string. It's a bit tricky, but doable.

    And as you said, you'd also want autocomplete and all the other goodies from Si3, so yeah, better to use Si3 for all that. Unfortunately, I can't say how long it may take me to allow embedding. I must finish Rename Refactoring first, then I'll consider next tasks from that perspective, based on demand for other features and complexity of each one.
     
    DGordon and syscrusher like this.
  15. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Hey @SilverStorm, thanks for asking and I hope @tosiabunio and @syscrusher already answered most of the questions (thanks guys!), but here's my view on things as well, for completeness:

    No. It is already on a 20% discount for Unity Plus and Pro subscribers, along with many other assets, so you may consider that option if you're planning to spend enough money on assets. You may end up getting the subscription for free that way and we, the publishers, paying for it.

    Other than that, it may go on sale, but I don't know when. It's up to Unity Asset Store to organize that and than to include Si3 in it. There's nothing like that on the horizon that I know... (well, I wouldn't be allowed to tell that even if I knew because that would lead to banning my assets from that sale and possibly all other future sales, right? ;))

    I also don't plan to reduce the price any further in near future. It used to be $55 and I reduced it $39 just to make it more accessible to people on budget. Si3 is constantly getting new features and improvements, so I should be actually increasing the price, but I don't. And you'll get all future updates for free, so I think the current price is quite fair.

    No, absolutely not! Nothing from Si3 will get included in a build, not even the tiniest icon images. As @syscrusher said, Si3 gets imported in a special folder of the project, so it all gets ignored when creating a build.

    As @tosiabunio already noted, Si3 doesn't allow debugging by setting a breakpoint and then stepping through code line by line. You'd still need an external IDE for that, either VS Community, VS Code, or Rider. You can, of course, still use Debug.Log to track execution of methods and inspect values that way, and Si3 will make that much easier than any other external IDE - Si3 comes with an improved Console window that allows easy navigation to call-stack of log entries. Additionally, Si3 allows (to some extents) inspecting of static and even non-static fields and properties by putting the mouse pointer over them in your code. If all that is not enough and you need a real debugger with breakpoints, then Si3 will help with that as much as it can - once you're at the line you want to add a breakpoint, simply press Ctrl-Enter and Si3 will open that script at that line in the external IDE.

    I hope this helps and I'm looking forward to see you again here with your first impressions soon :)
     
    tosiabunio and syscrusher like this.
  16. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Thanks so much.

    I managed to get this much better using rich text. I didn't realize that was supported in EditorGUILayout.TextArea. Unfortunately, even though it renders properly with the rich text, it still acts as if there are more characters in the textarea when editing, so its unuseable while editing. However, I'm toggling between a button skinned in the same exact way as the textarea with the color formatting I wanted, and upon click, it switches to the editable textarea without color formatting. Its not as good as what I hope your solution will be, but its much better than what I had before!
     
    Flipbookee likes this.
  17. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Ah, I didn't know editing in rich text mode wouldn't work. Great trick with the button to switch view modes :)

    Si3 uses a completely different approach. I re-implemented the whole TextArea, first because I wanted to make the keyboard and mouse handling feel same as in Visual Studio, second because the size of text in a TextArea is limited, third because I wanted to completely alter the rendering with blinking cursor, syntax highlighting, custom word wrapping, search results highlighting, reference highlighting, and especially get maximum speed in styled text rendering so that even smooth scrolling will actually feel smooth.

    And that's only the beginning! In addition, Si3 does syntax analysis by parsing the C# code and creating parse trees, then does semantic analysis of that C# code, which is then used for all the fancy things beyond just regular text editing. It allows unlimited Undo and Redo, code navigation, automatic code generation, and of course the most important for your case - automatic completion...

    I'm looking forward to getting the embedding work finally, just I have to finish this Rename Refactoring first and release it. I can't do anything else until that happens.
     
    DGordon and tosiabunio like this.
  18. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    bad news again, man

    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. System.IO.StreamReader.FindNextEOL () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:435)
    3. System.IO.StreamReader.ReadLine () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:494)
    4. System.IO.File.ReadAllLines (System.IO.StreamReader reader) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:576)
    5. System.IO.File.ReadAllLines (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:561)
    6. ScriptInspector.FGFindInFiles.GetOrReadAllLinesForPath (System.String assetPath) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGFindInFiles.cs:576)
    7. ScriptInspector.FGFindInFiles.GetOrReadAllLines (System.String assetGuid) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGFindInFiles.cs:564)
    8. ScriptInspector.FGFindInFiles.FindAllInSingleFile (System.Action`4 addResultAction, System.String assetGuid, ScriptInspector.SearchOptions search) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGFindInFiles.cs:501)
    9. ScriptInspector.FindResultsWindow.Update () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FindResultsWindow.cs:430)
    10. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    11. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    13. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    14. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:262)
    15. UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:255)
    16. UnityEditor.HostView.SendUpdate () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:330)
    17. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:249)
    18.  
     
    Flipbookee likes this.
  19. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    476
    Very unfortunately Script Inspector 3 is crashing every time in Mac currently.
    Latest Unity, latest OSX, latest SI3.
    Any time you make a change, then save, Unity crashes.

    LATER .....

    (1) the SI3 team made massive efforts to fix this problem as soon as it was reported

    (2) fortunately it only seems to be a problem in certain builds of Unity Editor

    two good things,

    (A) the problem seems to have gone away in the most recent Unity Editor release

    (B) anyway, SI3 team found a work around for the problem!! :)
     
    Last edited: Jul 15, 2018
    Flipbookee likes this.
  20. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Just out of curiosity, how did you re-implement the whole TextArea? Almost everything I do here these days is editor stuff (game engine is basically fully built ... just about making our editors better and better since it will probably be used for quite a number of years) and that sounds like knowledge which would potentially REALLY open doors for what I can do here ... in no way planning on competing with your product (not that I could ;)). Was that some tremendously insane hack, or are there built in APIs in Unity which let you do that?

    How much effort was it to just recreate a basic textarea, without any extra frills? I'm just testing for pre-defined keywords and coloring those with tags ... if I could get something working while its being edited someday, I would love to know which direction to investigate. Super simple functionality for us, but it just makes such a huge difference.

    Heck, if you built a separate product and sold it, a textarea that works the same way as EditorGUILayout.TextArea(), but just allowed you to pass in keyword/color (and a color for strings ;)), I would buy it ;). I'm assuming you have enough on your plate though, and that it might not be profitable enough for you, so I'm probably going to have to try that myself if I ever want it :p.
     
    Last edited: Jul 3, 2018
    Flipbookee likes this.
  21. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Muahaha. I managed to get it working myself when editing. I'm using EditorGUI.LabelField() to draw an exact replica of the textarea over it, skinning the labelfield so it has colored text formatting and a clear background, and the textarea to have invisible text. That way you only see the label's colored text, but you still get the cursor graphics from the textarea, and you have no funky richtext characters in the textarea to throw off the editing. Its working perfectly!

    Thanks so much for putting me on the right path here. :D
     
    Flipbookee likes this.
  22. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    GIF it, or it didn't happen! ;)
     
  23. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Thanks @thienhaflash, you're the best! It's seems like this is also related to those .bytes files in your project, so I'll take care of this too...
     
  24. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    @Fattie, I'm very sorry about this! Thanks a lot for sending me over email a video of the crash, the crash log, and a test project. Since then I'm trying to reproduce the crash, but I only got it twice with a similar crash log as yours, which is not very helpful, unfortunately. I have no idea why it happens so often on your Mac, mine just doesn't want to crash, so I wasn't able to find a pattern that reproduces the crash. Those two cases are just not enough to find out what's triggering it. I just upgraded my OS X to match your system and quickly tried to reproduce the crash - no luck so far, but I'll keep trying... I hope something will come out of that very soon...
     
  25. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Well, it was a huge effort, simply said. The whole Si2 cycle was about that mostly, and that lasted for a bit more than a year. I'm used to draw the text with GUI.Label but I switched later to the faster GUIStyle.Draw method. Position of each word is computed, then drawn using an already prepared GUIStyle. The blinking cursor, text selection, current line highlighting, line numbers, highlighted background on search results and symbol references, matching brackets, etc. are all drawn in a similar way.

    Drawing was the easiest part though. Handling keyboard and mouse input took even more time, but it was well worth it - this gives rich UX with everything and a bit more of what users would expect from a modern code editor, and people love it! :)

    Undo and Redo isolated per text buffer was another beast of a task. I'm so proud of how that works now! :)

    So all that was needed only for the basic text editor. Then the Si3 cycle started - autocomplete with all the related rings and bells took a few more years! And there's still more stuff to go in that...

    I found decompiled Editor source code was the best resource to learn from. Now that's even easier - all that's officially supported by the Unity team. They released the source code on github: https://github.com/Unity-Technologies/UnityCsReference/tree/master/Editor/Mono

    EDIT: Well, the version 1.0.0 was only a viewer and it had syntax highlighting since the initial release. That took me about 10 days only to create it from scratch, so drawing the text wasn't a difficult task at all. Cursor navigation with selections via mouse and keyboard took several months and it lasted till the end of Si1 cycle. That was still a viewer only - editing came with Si2.
     
    Last edited: Jul 4, 2018
    DGordon likes this.
  26. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Thanks for all the information. I really appreciate it :).
     
    Flipbookee likes this.
  27. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    @Fattie I have some good news to share with you - Unity fixed the crash in version 2018.1.7 released just 2 days ago! Versions 2018.1.5 and 2018.1.6 contain the bug and it won't be fixed because it seems like Unity stopped releasing patches for Unity 2018, but you can avoid using these version...

    Thanks to all the details about the crash you shared with me over email, I also managed to find a workaround for using Si3 in Unity 2018.1.5 and 2018.1.6! :) I'll release the workaround today to avoid receiving negative reviews. Just got one by @Hotcakes :( but that's the life - each time Unity introduces a severe bug like this, Si3 receives negative reviews even though that's not my fault at all. That's why it's very important to post a positive review if Si3 is making you enjoy working in Unity as never before! Thanks so much to all of you who already did that, and if you haven't done that yet, it's the best time for that now! Here's the link where you can do that: https://www.assetstore.unity3d.com/en/?stay#!/content/3535 and thanks in advance :cool:

    Please watch this thread. I'll announce here when the hotfix is available on Asset Store and it will include all the other minor fixes that were done during the last month.
     
  28. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Appreciate the insights and support!

    I use use this tool every day, can't imagine anymore how people work with external
    editors, so much faster using internal.
     
    syscrusher, sngdan and Flipbookee like this.
  29. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    476
    Has anyone had this suggestion ?!

    the actual "close tab" button could be:



    Is it possible ?!

    That would be huge!
     
    Flipbookee likes this.
  30. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    93
    You can also use the middle mouse click to close Unity tabs, same as in your browser.
     
    Flipbookee likes this.
  31. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    Any plans for folding regions support?
     
    Fattie, Lars-Steenhoff and Flipbookee like this.
  32. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Yes, right after releasing the Rename refactoring. I was working on that for a while and I got it half working at that time, now I’d only have to finish that.
     
    tosiabunio likes this.
  33. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    476
    In OSX - Xcode,

    To fold whatever you're currently inside

    the key stroke is

    Option-Command-LeftArrow

    it gets really built-in to your fingers. I hope this is the keystroke in SI3 :)

    Folding would be huge, huge.
     
    Flipbookee likes this.
  34. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    bad news, man, bad news

    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. FGTextBuffer.FormatLine (Int32 currentLine) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:2647)
    3. FGTextBuffer.ReformatLines (Int32 fromLine, Int32 toLineInclusive) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:2633)
    4. FGTextBuffer.ProgressiveLoadOnUpdate () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:712)
    5. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:249)
    6.  
     
    Flipbookee likes this.
  35. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    That's a strange error, but it should be easy to fix... Thanks @thienhaflash!
     
  36. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Hmm, Alt-Cmd-Left arrow in Si3 moves the cursor back to its previous position... complicated ...
     
  37. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    Hi, I get this error, when I check for references (right click -> FindAllReferences)

    2018.2.0f2 (with ECS) on Mac
    Net 4.x
    IL2CPP

    Code (CSharp):
    1. ArgumentException: Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'System.Comparison`1[System.String]'.
    2. System.Collections.Generic.IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer (System.Object comparer) (at <f826c2584fc94ec19a48a6576640bdc5>:0)
    3. System.Collections.Generic.ArraySortHelper`1[T].Sort (T[] keys, System.Int32 index, System.Int32 length, System.Comparison`1[T] comparer) (at <f826c2584fc94ec19a48a6576640bdc5>:0)
    4. System.Collections.Generic.List`1[T].Sort (System.Comparison`1[T] comparison) (at <f826c2584fc94ec19a48a6576640bdc5>:0)
    5. ScriptInspector.FGFindInFiles.FindReferenceCandidates (ScriptInspector.SymbolDefinition symbol, System.String localAssetPath) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGFindInFiles.cs:469)
    6. ScriptInspector.FGFindInFiles.FindAllReferences (ScriptInspector.SymbolDefinition symbol, System.String localAssetPath) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGFindInFiles.cs:101)
    7. ScriptInspector.FGTextEditor+<>c__DisplayClass204_3.<DoGUI>b__12 () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2799)
    8. UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:121)
     
    Flipbookee likes this.
  38. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Wow, that’s an interesting one... Is there a way you could share that project with me?
     
  39. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    @Flipbookee

    I just figured out that this error happens in an empty project with only SI3 installed - it seems to be related to Net4.x
    Net4.x -> Error
    Net3.5 -> No Error
     
    Flipbookee likes this.
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    I found the issue - it was my fault :confused: and .Net 3.5 wasn’t complaining about that, but .Net 4.6 does. I’ll fix it quickly!
     
  41. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    Super - thx. My fix for now is just to return 0, directly- so it works again but results are not sorted.

    Can you also check if there is an issue with clicking on a console message, not jumping to the script position.

    I am on 2018.2.0f2 and it happened to me, but that might have been related to experimental packages I installed (ecs) in which case, just a heads up....
     
    Flipbookee likes this.
  42. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Bad news for today,

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEngine.GUI.Label (Rect position, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUI.cs:170)
    3. FGTooltip.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTooltip.cs:360)
    4. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    5. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    6. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    7. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    8. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:262)
    9. UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:255)
    10. UnityEditor.HostView.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:84)
    11.  
     
    Flipbookee likes this.
  43. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Awesome! Thanks, I just fixed that :)

    Fix511.png
     
    JoeStrout likes this.
  44. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    476
    Minor issue - I noticed does not autocomplete in the case of an Interface ..

    did I stumble on a bug or is this one not a feature yet?

    screenshot.png

    in the example, it does not know to autocomplete "BeginRun" or "MoveVehicleToStartPositionAndWait" (I typed that one manually)

    SI3 forever!
     
    Novack and Flipbookee like this.
  45. pdyxs

    pdyxs

    Joined:
    Sep 7, 2012
    Posts:
    6
    Minor feature request:
    When you click on the dropdown menu of a MonoBehaviour, there's an option for 'Edit in Script Inspector'. It would be fantastic if there was a 'Edit Editor in Script Inspector' option as well (if there is a CustomEditor defined for the class).
     
    Flipbookee, Novack and MostHated like this.
  46. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    OK, I've got one that's been bugging me more and more, only because it's a flaw in an otherwise perfect product. :)

    It drives me nuts when the editor breaks my correctly-typed code. Usually this is by inappropriately changing the case. For example, I type:

    Code (csharp):
    1. Debug.Log("Activating " + gameO
    thinking
    gameObject
    , of course. But when I hit Tab, Si3 instead changes it to:

    Code (csharp):
    1. Debug.Log("Activating " + GameObject
    ...at which point, I either notice and have to go back and fix it to what I correctly typed before, or (more often) I am on a roll, add the ");", and hit Play, and then get a compiler error (and then have to go back and fix what Si3 broke).

    Yes, I know if I'm going slow enough I can see that the Intellisense pop-up had "GameObject" highlighted before I hit tab. But I don't go that slow. And moreover, that's not what it should have highlighted. There is an exact, case-sensitive match for what I've typed so far; clearly if I hit Tab at that point, then that's the one I want.

    So.

    Can we please always favor a case-sensitive string-start match over a case-insensitive or substring match?
     
    Deeeds, Flipbookee and Novack like this.
  47. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Absolutely yes! I thought that's the case since long time ago when you asked for that, but I may have broken something, not intentionally, of course. I'll check...
     
    JoeStrout, Deeeds and Novack like this.
  48. ElevenGame

    ElevenGame

    Joined:
    Jun 13, 2016
    Posts:
    146
    Hello there, Script Inspector 3 is really great, but I am having an issue in the Unity 2018.3 beta versions:
    None of the keyboard shortcuts displayed in the right click menu seem to be working.
    (Ctrl+C, Ctrl+V, Ctrl+Z, Ctrl+A, etc.) I have tried it in an empty Project and Betas .0.3 and .0.4.
    It is not my PC configurations fault, because it still works in older Unity Versions such as 2018.1.

    Maybe Unity has changed the internals of how those commands work in 2018.3?
    It would be nice if you could look into that!
     
    Flipbookee likes this.
  49. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,788
    Hey @ElevenGame, a couple of other people reported that as well, and I only now checked this...

    Believe it or not, it seems like Unity Technologies has fixed the bug that prevented Si3 or any other extension to handle keyboard shortcut used in the main menu, such as Ctrl+S, Ctrl+Z, Ctrl+O, Ctrl+N, and such! :eek: This means that now Si3 can handle those shortcuts on OS X (with Cmd instead of Ctrl) without the keyboard plugin!!! YAY!!! :D

    However, that made the current way of handling some shortcuts in Si3 incompatible with Unity 2018.3 beta, but that's easy to fix, fortunately. Here's what you can do until I release the update:
    - Open FGTextEditor.cs.
    - Go to line 2386. That should be the beginning of DoGUI function.
    - Paste (right-click then select Paste, since Ctrl+V doesn't work) this code at the beginning of that function:
    Code (csharp):
    1. #if UNITY_EDITOR_OSX
    2.         if (Event.current.type == EventType.KeyDown && Event.current.modifiers == EventModifiers.Command)
    3. #else
    4.         if (Event.current.type == EventType.KeyDown && Event.current.modifiers == EventModifiers.Control)
    5. #endif
    6.         {
    7.             switch (Event.current.keyCode)
    8.             {
    9.             case KeyCode.D:
    10.             case KeyCode.F:
    11.             case KeyCode.C:
    12.             case KeyCode.X:
    13.             case KeyCode.V:
    14.             case KeyCode.A:
    15.                 return;
    16.             }
    17.         }
    - Save the changes and let Unity compile that.
    - Open this link http://u3d.as/2ZC and add a nice review for Si3 ;) (if you haven't done that yet).

    The shortcuts should work now! :cool: Congratulations! You've became a magician - you just modified the source code of a code editor using that same code editor and that change works now in it even though you didn't stop using it. Pure magic! Is'n that ultra-cool?

    EDIT: I forgot to mention, that last step in the list above is the most import actually, so don't skip it :p

    Enjoy!
     
    ElevenGame and JoeStrout like this.
  50. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    Hey hey, just dropping in to make a quick suggestion though I guess it'll be low on the priority list: intellisense for shadelab and cg.

    As useful as this is as a general light weight ide for gameplay code and editor stuff... the main reason I keep adding script inspector to every project I have is due to shader development - because there's been literally no other decent option.

    Pretty please? one day? :p
     
    led_bet and Flipbookee like this.