Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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,484
    I believe this is the same issue that prevented editing in the Inspector even in older versions of Unity, so I may have a fix for that already...

    I don't think that's related. He talks about a change introduced in the Inspector with recent versions of Unity, while what you need is an option to prevent accidental editing, which I believe you can do easily by disabling the control, just set GUI.enabled to false. Of course, I'll keep your requirements in mind.
     
    Lars-Steenhoff likes this.
  2. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    543
    I'm not sure? I thought he meant that when clicking on an actual .cs file in the project, the inspector no longer allows you to edit it. Instead, you now have to directly open a SI3 window to edit. If that's not what he meant, no worries, my mistake.

    So long as there's a built-in (no code changes required) way to prevent people from selecting items in the project window and then accidentally changing the code base through the inspector, I'm happy however it works. I'm the only real programmer in these projects, so I don't want to easily open up our engine code to accidental changes by artists / content scripters.
     
    Flipbookee likes this.
  3. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    543
    Okay, I think I did as much with the SITextArea as I'm going to for now. Just need to have it used in production for a while, iron out any bugs, and then I'll look at cleaning it up for a share since I had to try things at times to figure out what was actually needed.

    My biggest head-banging-against-keyboard moments as I went through FGTextEditor was figuring out how to prevent events when not focused and/or not consuming the events. I'm sure I can clean that up now that I have some grasp on what was going on, and hopefully bring most of that into SITextArea. I spent half a day trying to figure out how to stop this from consuming keyboard and mouse events, since any textfields AFTER this was drawn stopped working. I did eventually fix it though, and at this point, its feeling pretty slick.

    I even hooked into the search code!
    code_editor_search.PNG

    I also seemingly solved the indent problem, so now everything starts flush against the left border, and new automatic indents are correct.

    However, I never solved having my "Reset Indents" option work using your code ... it may have been my a simple mistake on my part, and I can look later. Its supposed to just reformat the entire code, stripping all whitespace from the start of each line, and the indenting the entire textarea properly. That option from the screenshot is using my own much-worse version, which reformats the text in a good-enough-for-our-projects way, but doesnt handle it in a proper way like using SI3 code would. So some day I might poke at using ReindentLines(1, maxLine) some more and then have something to ask, but its useable enough for us as is.
     
    Last edited: Nov 11, 2019
    Flipbookee likes this.
  4. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    @DGordon, that's veeeery impressive! Congrats, you earned my highest respect!!! :cool:

    I never thought this project will turn in a way that you guys get to do all the fun stuff, while I'm only stuck on solving compatibility issues with new Unity releases. :rolleyes:

    Let's add that Immediate Code Window now...
     
    Lars-Steenhoff likes this.
  5. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    543
    Hey, the following is invalid because the return type does not match what is expected (void, when it requires IEnumerator). It throws a compile time error.

    However, notice there is NO error shown.
    si3_return_noerror.PNG

    This is the exact same code, shown in Visual Studios. Notice the error.
    si3_return_error.PNG
    A few questions:

    (A) Is this a bug, or does SI3 not support showing errors of this type?
    (B) Is there any built-in way to query if FGTextEditor has _any_ errors shown, or should I figure that out myself? I would like SITextArea to have some easy way of grabbing if any errors are shown, so the full editor it belongs to can display an error message saying there is an error in X script.
    (C) Is there any way to add custom squiggles and messages? I would love to add an "error" in the editor to calling an IEnumerator method without yield return, which will just fail silently. If I could start detecting syntax that I know our scripters make mistakes with, and giving them messages as they type, that would be extremely powerful
    (D) Can we do something with unreachable code like Visual Studios does? The more visual queues that something may be wrong, the better for my use-cases, since Im trying to prevent / detect errors by non-programmers.

    I'm aware that any changes will need to be updated with my current code. I do plan on getting you a version of this that makes sense after its stabilized. I'm also slowly trying to refactor the code I needed _outside_ of the SITextArea into easy-to-use static methods, so other people can basically just use it without having to figure out the same stuff Im dealing with.

    PS: Our engine is LOCKED into specific unity versions (too much time to update the engine + projects too often). Right now its 2019.1.0f2. When 2019.3 LTS comes out, we'll probably try to upgrade to that, and then sit there for a couple of years. So hopefully whatever updates you do will be useable by these versions as well for the next couple of years :).
     
    Last edited: Nov 15, 2019
    Flipbookee likes this.
  6. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    121
    I have noticed that the compilation of scripts has become very slow recently. I have migrated to unity 2019 but I don't know if that is related to it.
    I am aware that SI3 does not actually compile the scripts. I have done a few experiments and have found that it can easily take a long time before a script is compiled after I save the file in SI3. However, if I close the tab containing the script in SI3, then it goes very quickly. In fact it is enough if I close any other tab in SI3, for the compilation to go quickly. That is even if the tab contains a completely different script other than the one I want to compile. So, somehow it is related to unity detecting when SI3 has closed a file.

    Has anyone else observed this? Is there any other solution other than closing tabs in SI3?
    Thanks
     
    Last edited: Nov 19, 2019
    Flipbookee likes this.
  7. eggtart

    eggtart

    Joined:
    Feb 4, 2013
    Posts:
    46
    I am running Unity 2019.3.b10 and using the professional dark theme. I found that the current selection of the autocomplete popup is all black which is almost impossible to read.
    Screen Shot 2019-11-26 at 12.38.13 AM.png

    Also, I have not been able to change the font size using Cmd + mouse scroll wheel. Please help. Thanks!
     
    Flipbookee likes this.
  8. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    Thanks @eggtart! That's still a beta version of Unity, but I'll check these issues...
     
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    I believe this is an issue introduced by Unity 2019.2 in the native code of the Unity Editor. It can be easily reproduced by moving any floating tab of the Editor before saving a script modified in Si3. In that case, Unity will compile the code and produce new assemblies, but it won't reload them until "reloading of assemblies is unlocked". The Editor has a mechanism to lock and unlock the reloading of newly compiled assemblies to prevent that from happening in the middle of a mouse-dragging operation for example. This locking seems to now happen when the user starts dragging a floating tab, just they forgot to unlock that when dragging ends. This feature is accessible through the Editor API, but unfortunately, it looks like it isn't possible to unlock that through the API if the locking has happened in its internal native code. You can see this is the reason for not reloading the assemblies - a lock pad icon appears in the right corner of the status bar in the main Unity Editor window. Fortunately, this locking also happens when a context menu is displayed and unlocking happens when that context menu is closed, so an easier workaround is to simply open a context menu and close it with another click on the side. That's not a nice workaround, especially for someone not knowing how to deal with this issue, so I've spent these last three weekends trying different workarounds, but unfortunately, none of them worked so far. There are a few more ideas I got in the meantime, so I hope I'll find an automatic way to fix that issue when it strikes like this... Till then, please use the right-click workaround. :)
     
    PiAnkh likes this.
  10. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    130
    HI,

    I just bought this asset. I found there is not “Rename” function where I can change a variable name, and it updates through the whole project. Correct me if I am wrong....

    Other thing, it doesn’t highlight any error where I have initialised two variables with the same name. Is there something to do with the settings?
     
    Flipbookee likes this.
  11. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    543
    Still just getting more experience using this, but its holding up well.

    Would love some feedback on the questions above, even if its a "dont support it". Thanks!
     
    Flipbookee likes this.
  12. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    Hi @Gamrek! That's correct, the Rename feature is currently missing. I've been working on that feature for quite some time and I have a working prototype, just not ready to be released yet. As an alternative, Find All References feature is working currently, so you could use that in the meantime, with a little bit of manual work.

    The second question is another not yet implemented feature. I'll check, it should be easy to add that...
     
    Lars-Steenhoff likes this.
  13. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    Ah, sorry, I forgot to reply...

    Showing that error is not implemented, but it should be easy to support it. I'll see what I can do...

    Currently, there's no method you could simply call and check that. The way it works is this:
    - Syntax errors are detected while parsing the code. There are only two types of syntax errors that cover everything - it's either an "unexpected symbol" error or an "expected token not found" error.
    - Semantic errors are, of course, detected during the semantic code analysis. An endless list of such errors exists and Si3 supports only some of them, mostly those that were free to implement and only a few that required additional processing to detect them. Supporting more semantic errors is possible, of course, and the plan was to support more and more semantic errors with new releases.
    - Errors are stored with the token that would be shown with squiggles on it. And the tokens are stored in the FGTextBuffer, so you could go through all of them looking for one with syntax or semantic error on it. However, Si3 would parse the script and do semantic code analysis only when it absolutely has to do that, so it may not do that for parts of the code that aren't visible. You'd have to ask Si3 to "resolve" a token to force error detection on it.


    Well, technically there is a way, but it isn't an easy way, so no, you can't add support for that error by yourself, but I can. So, if that example compiles fine then yes, I'd love to warn the users when they do that!

    Well, everything is doable given enough time... That error, in particular, would be a bit harder to detect with Si3 because there's no code in it for anything similar that I could reuse, like with the return type you mentioned above.

    You sound like you'd want to know about any possible errors before your code snippets get compiled. Why don't you just try to compile them and check the results?

    I've been thinking recently about replacing my own syntax and code analysis with Roslyn. That would require some big changes to Si3 code, but it might be a worthy investment for the future of Si3. That would give me support for all current and future versions of C#, almost for free, and I'd have more time to focus on improving the UI. And that would show me all the errors and even code smells, so it's an interesting idea that I'm going to explore soon. :cool:
     
    DGordon and Lars-Steenhoff like this.
  14. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    Hi @Flipbookee

    I hope all is well. I noticed that there hasn't been an update in 9 months and am a little concerned about the future of Si.
    Really don't want to loose such a great asset to the community (including yourself).

    May I suggest using Github or something similar to track bugs and requests to keep things sane. A support ticketing system could help reduce your time on the forums. If you start a Patreon, I would donate along with others here if you need more financial incentive. If you need more sales, you could also update the asset store image. Maybe a shiny Si4 2020 announcement?

    Keep going, you got this!
     
  15. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    481
    I second this, would definitely become a Patron if it will keep Si alive.
    There hasn’t been updates to Si in 9 months, and a lot of things stopped working on the newer Editor.

    I am a little bit worried, since no other asset came close to its Si in terms of its portability and speed.

    Sure, please do integrate to Roslyn if it will help get Si development more manageable.
    I’ve been using uCodeEditor ever since Si doesn’t function well with 2019.2 onwards, and I can see the benefits on using 3rd party code and syntax analysis. (A lot of cool features!) Though, that comes with losing its lightweight nature, portability, and a bit of a hassle with installing 3rd party dependancies.

    uCodeEditor have a bit of startup time, and It does not work directly on the inspector like Si does. It also does not use Unity Editor’s tabs, and instead have its own UI within Unity’s inspector window. Which I am not a fond of. I really hope Si can retain everything it currently is even when Roslyn will be integrated. Sure these are not big issues, but I still can’t help but miss Si for these small things when using its alternative.

    And hey, I wish there is a small official Si3 update just to fix compatibility with 2019.2+ Instead of the huge absence, even if there is no big feature update with it.
     
    haywirephoenix and Flipbookee like this.
  16. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,948
    You guys don't need to worry, The problem is not with script inspector, the problem is with unity, they are breaking so much stuff all the time that its better not to update every breaking change unity makes. but to wait until unity is more stable.

    Otherwise there will never be new features in script inspector because all the development time would go to compatibility fixes.

    Script inspector works in the latest alpha version, but I would recommend that only LTS releases are officially supported so time can go to making new features.

    This is just my personal opinion, and I'm a user of script inspector
     
  17. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    @Lars-Steenhoff I agree regarding alpha and beta Unity builds, I personally only use LTS unity releases and even then I don't update straight away. As @Gekigengar pointed out, there are minor issues that have not been addressed in a long time; for example 'sticky' tooltips, and autocomplete sometimes throws a null. There are other kinks here and there I overlook assuming they will be fixed at some point but they never come. In almost a year, you would expect having minor bugs ironed out would be the bare minimum, at at best some new features.

    We've all seen assets fizzle out as devs loose interest for whatever reason. I just want to prevent that from happening with Si. I can respect that @Flipbookee released Si (in 2012!!) and is still here almost 8 years later (I can barely find the focus to finish a single project) which is extremely admirable, and also has a career and life to maintain. Hence my offering of ideas as to how we can not only keep Si alive but witness it explode. Imagine what could become of this with a little help.
     
    Flipbookee likes this.
  18. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    @haywirephoenix, @Gekigengar, and @Lars-Steenhoff, thanks so much for your support! You guys are amazing :) and without people like you, this project would have been dead a long time ago. No, finances are not an issue as long as I still have my day job to pay the bills and Si3 is here to bring some pocket money for a little extra in life.

    What I'm missing the most is time, as you might have imagined, and I can't buy more if it. I can only work on Si3 over weekends. And even though I do that, still, the rate at which newer Unity versions break things in Si3 sometimes exceeds the rate at which I find workarounds for that! This was really disappointing. I fix one or two things, and at the same time, I discover more broken things in the latest Unity releases... Messages of support like yours above are exactly what I was missing at this time to keep me going.

    Thanks for all the suggestions as well! And I think yeah, I'll release the fixes I have so far before continuing with the remaining ones.

    I also hope people here are going to help me with this new release (tonight, hopefully) by reporting issues with it as you encounter them. Not that you were not doing that so far, I just want to say such help now will be more welcome than before. With so many Unity versions on two operating systems and Unity Editor options that sometimes interfere with Si3, the largest amount of time I spend goes on testing each fix or workaround on all of them. That's after the time I have to spend downloading and installing several new Unity releases every week.

    Thanks! :)
     
  19. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    YAY!!! I found a workaround for that nasty bug in Unity 2019.2 - they forgot to unlock reloading assemblies after moving a floating tab with the mouse!!! :cool:

    At least on Windows for now (checking MacOS next) but this is so huge that it deserves a new immediate release! :D

    I've spent the last three weekends just trying to find such a workaround. I can't believe I finally solved this... (you see, friendly support does miracles sometimes)
     
    Hormic, DGordon, Gekigengar and 2 others like this.
  20. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    @Flipbookee great to hear from you and so glad we could be of some help. Amazing that you're fixing things already, can't wait to try the next release. I'd be happy to test things for you and report back any time. And again, if you want to use something like github to keep track of bugs and changes I would contribute on there. If it takes a load off, I for one wouldn't notice if Si wasn't kept on the bleeding edge of unity builds.
     
    Last edited: Dec 7, 2019
    Flipbookee likes this.
  21. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    543
    I'm still refining how I'm using this in my code, and then I have to do major refactoring (probably take down your SI3 fresh, then reimplement this with as few changes as necessary). After that I'll send it to you, with each line clearly marked with a comment you can search on, or something like that.

    I just wanted to mention that being able to use this in the editors is really awesome. So I'm definitely throwing in my "I hope this sticks around for years" as well! I'd be thrilled if the immediatewindow stuff ends up helping you net more customers.
     
    Flipbookee and Lars-Steenhoff like this.
  22. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    543
    Those requests were about issues that don't get caught by the compiler. So even if we _did_ compile and then check, it would pass anyway. These are requests for highlighting problems that technically compile, but will still break when the game runs (ie: not putting yield return before calling a coroutine runs ... it just fails silently). Also visually styling unreachable text like VS does (also compiles fine). As well as thinking it would be nice to be able to implement syntax checking for things _I_ don't want our scripters doing, and then being able to show them _as they write it_, as opposed to never finding out about it and then having messier scripts.

    Completely agreed that having to compile and then finding errors is fine ... its how we handle everything, and nothing can squeak through so _when_ they get caught doesn't matter. However, for stuff that _won't_ get caught, I would love to throw something in the coders face as its written. The only nice-to-have about catching compile-time-errors before the code is compiled, is then I can display the error in my editors as well ... which isnt necessary, just "nice".

    Even if none of that can get done, this is still amazing. My only real complaint is that bug where its yelling about an unknown type for no reason that I had mentioned way-back-when ... which for all I know you might have already fixed, since I can't update SI3 until I get this over to you to implement for real. Below is an example of the error, just to refresh your memory if you didn't get around to it.
    si3_error.PNG

    All told, loving this.

    Now I wish I could use this for my ReactJS code as well. So ... eta on implementing typescript? :D
     
    Last edited: Dec 11, 2019
    Flipbookee likes this.
  23. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    @Flipbookee Here's a fix for the missing preferences menu item in Unity 2019.3! the "[PreferenceItem]" attribute is deprecated.

    SiSettings.cs : replace line 393

    Code (CSharp):
    1.  
    2. #if UNITY_2018_3_OR_NEWER
    3. private class SiPrefSettingsProvider : SettingsProvider
    4.     {
    5.         public SiPrefSettingsProvider(string path, SettingsScope scopes = SettingsScope.User)
    6.         : base(path, scopes)
    7.         { }
    8.         public override void OnGUI(string searchContext)
    9.         {
    10.             SettingsGUI();
    11.         }
    12.     }
    13.  
    14.     [SettingsProvider]
    15.     static SettingsProvider SiPreferences()
    16.     {
    17.         return new SiPrefSettingsProvider("Preferences/Script Inspector");
    18.     }
    19.   #else
    20.    [PreferenceItem("Script Inspector")]
    21. #endif
    FGListPopup.cs needs love. I don't know why selectedListItem.png and inactiveListItem.png textures don't display.


    Update:

    Workaround, in FGListPopup.cs replace line 394 with:

    Code (CSharp):
    1. onFocused = { background = selectedListItem, textColor = Color.cyan },
    Seems like with a minor modification the autocomplete list colours could be theme controlled aswell.

    Ps: I stumbled upon this https://trello.com/b/uDFFI2C5/script-inspector-3-roadmap it would be cool to see it updated, for your followers and help you keep track. Happy new year, have a good one.
     
    Last edited: Jan 1, 2020
    Flipbookee likes this.
  24. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    @eggtart
    I have a workaround for the black autocomplete. It's not perfect but at least you can see the text. In FGListPopup.cs replace line 394 with:

    Code (CSharp):
    1. onFocused = { background = selectedListItem, textColor = Color.cyan },
    Try control+scroll? I don't run mac os anymore but have no issues with zoom on windows.
     
    Last edited: Jan 1, 2020
    Flipbookee likes this.
  25. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    Thanks @haywirephoenix!

    I have a better workaround, please replace the whole LoadResources() method in FGListPopup.cs with this code:
    Code (csharp):
    1.     private static void LoadResources()
    2.     {
    3.         if (symbolIcons == null)
    4.             LoadSymbolIcons();
    5.        
    6.         var textColor = FGTextEditor.StylesCode.normalStyle.normal.textColor;
    7.        
    8.         var hollowTexture = new Texture2D(1, 1);
    9.         hollowTexture.SetPixel(0, 0, Color.clear);
    10.         hollowTexture.Apply();
    11.        
    12.         listItemStyle = new GUIStyle
    13.         {
    14.             fixedHeight = 0,
    15.             padding = { left = 2, top = 2, bottom = 4, right = 2 },
    16.             border = new RectOffset(2, 2, 2, 2),
    17.             margin = new RectOffset(3, 3, 0, 0),
    18.             overflow = { left = -20 },
    19.             normal = { background = hollowTexture, textColor = textColor },
    20.             onFocused = { background = selectedListItem },
    21.             onNormal = { background = inactiveListItem, textColor = textColor },
    22.         };
    23.     }
    This is a workaround for a bug in GUIStyle introduced with Unity 2019.3.0 - the background texture in other states doesn't get drawn if the "normal" state has no background texture, so this code creates a single-pixel transparent texture and assigns it to the "normal" state.

    You guys must be very brave for taking the risk by jumping in on a ".0" version of Unity ;)
     
  26. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    I was celebrating too early... That workaround wasn't working always, so I had to find a better one. So far, this other workaround worked always in Unity 2019.2.xx, but it didn't work in 2019.3.0, so I have a different one for that version too and it seems to work fine so far. :)

    However, I'm still looking for a workaround that works in Unity 2020.1 Alpha, but I've reported the bug, so maybe they'll fix it before the release... A good thing is that the Unity Editor for Mac is not affected.
     
  27. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    Legend. It works, thank you! I'm on 2019.3.0f3, for the 2D Renderer. As a bonus I'm enjoying the new UI skin which all plays nicely with Si (thank f). Purchased assets can be found in the package manager also which is nice. A gift for you:

     
    Last edited: Jan 3, 2020
    Flipbookee likes this.
  28. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,328
    Sorry if this has been answered already, but is there a setting or anything to get ScriptInspector to recognize C# 6 (.NET 4) code yet?
     
    Flipbookee likes this.
  29. r137

    r137

    Joined:
    Mar 12, 2018
    Posts:
    30
    Hi, On 2017.4.30f I couldn't get this drag drop feature working



    It is working with the hierarchi but it is not working with the drag dropping prefabs from project view.

    expected behaviour:


    actual result:
     
    Flipbookee likes this.
  30. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    No, it isn't supported yet. I'll be either adding support for that step by step over several new releases or I'll be switching to Roslyn code analysis.

    Ah, I see! Thanks so much, I'll fix that...
     
    Lars-Steenhoff likes this.
  31. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    Good news!
    Script Inspector 3
    version 3.0.26
    has just been released in the Asset Store

    Please update your projects :)

    Here's a compacted list of the changes in this version:
    - Compatibility updates for:
    * Editing in the Inspector window
    * Si3 popups in Unity 2018.3+
    * Highlighting the selected autocomplete item
    * Positioning of floating tabs in Unity 2019.1+
    * Si3 Preferences in Unity 2018.3+
    * SI Console in Unity 2019.3+
    * Handling tab-switching shortcuts in Unity 2019.2+
    - Workaround for unlocking reloading assemblies incorrectly locked by Unity Editor in Unity 2019.2+
    - Workaround for keeping current tab's focus on Save
    - Added all built-in Console window menu items to SI Console
    - Restored the option to disable handling Ctrl+Shift+F globally
    - Fixed modified line indicator position on horizontal scrolling
    - Fixed the foldout GUIStyle in the shader inspector
    - Fixed a rare NRE in the parser
    - Fixed opening scripts by drag-dropping prefabs
    - Fixed opening only certain types of assets

    My apologies for the colossal delay :rolleyes:

    Enjoy! :cool:
     
  32. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    Now that's how you write a great review:

    upload_2020-2-15_13-16-41.png

    Thanks so much @JoeStrout! :) Your original review from 4 years ago was also one of my favorites, but this one is equally amazing, if not even better. :cool:
     
    BackwoodsGaming and JoeStrout like this.
  33. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,319
    Yeah, I don't know why it prompted me to write a review again, but it did, so I thought, why not? :)
     
    BackwoodsGaming and Flipbookee like this.
  34. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    183
    How many of the above things have since been implemented?

    I'd love more search functionality. Especially for searching the whole project, finding exact case, highlighting all terms searched, and find/replace functionality. Unless I'm missing something?

    Either way, really been enjoying it so far. =)
     
    Flipbookee likes this.
  35. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,319
    Yep, you're missing something. Check the Script Inspector 3 menu for "Find in Files..." or "Replace in Files..."
     
    Flipbookee and Stexe like this.
  36. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    183
    Gotcha. I was more looking for it in the Inspector window search bar. But that works too.

    Would still appreciate highlighting all instances of the selected word like you see in Visual Studios.
     
    Last edited: Feb 24, 2020
    Flipbookee likes this.
  37. AnsisMalins

    AnsisMalins

    Joined:
    Mar 16, 2014
    Posts:
    7
    Hello. When editing a shader, does Script Inspector support navigating to the contents of an #include and navigating to the definition to a function in an include (e.g. UnityObjectToClipPos)?
     
    Flipbookee likes this.
  38. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    842
    Great stuff. Imostly like this feature to calculate math stuff.
    Any news about or can I beta this feature?
     
    Flipbookee likes this.
  39. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    Oh, no, it doesn't. The support for editing shaders is quite limited - it's a text editor only for shaders (with syntax highlighting). All the code analysis features are currently limited to C# scripts only.
     
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    There hasn't been much progress recently. The project at work is nearing its release date and I've been putting extra efforts there every day, then I'm exhausted over the weekend... I'll be able to continue with Si3 in about a month, after the release.
     
  41. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    Hi @Flipbookee I hope you're well and safe.
    Any advice on this whitespace bug?

    Many thanks.

     
    Flipbookee and Stexe like this.
  42. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    That's an interesting find and it should be an easy fix if I manage to reproduce it. But if I can't reproduce it (it hasn't happened to me so far) then I'll try some changes in code and I'll have to ask you to help me check whether they fix the issue.

    Cheers!

    EDIT: I forgot to say - knowing what Unity version is that and on which OS would be enough help for now :)
     
  43. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    Of course, apologies I thought it was a known issue.

    Unity 2019.3.13f1 - Empty Project
    Si 3.0.26 - Clean install
    Win 10 v1903 build 18362.778

    Edit: I should note that it's been happening for me across multiple builds not just latest. I thought it could be your recent invisible texture fix but commenting out that section didn't work, sometimes I notice an error relating to the caret, I dont know if that helps. Before commenting I did spend quite some time in FGListPopup trying to find the cause.
     
    Last edited: May 21, 2020
    Flipbookee likes this.
  44. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    I've created a handy addon for Script inspector that allows you to jump to the opening or closing brace. Simply hit Ctrl+End to jump.

    Add the following to FGTextEditor, line 7714 (Directly beneath "case KeyCode.End:")

    Code (CSharp):
    1.  
    2. if(current.control){ //++Jumpto
    3.                         isHorizontal = true;
    4.                         var tokenLeft = textBuffer.GetNonTriviaTokenLeftOf(caretPosition.line, caretPosition.characterIndex);
    5.                         var parentLeaf = tokenLeft.parent;
    6.                    
    7.                         if(parentLeaf != null && parentLeaf.IsLit("{")){
    8.                             nextCaretLine = matchingBraceRight.line;
    9.                             nextCharacterIndex = textBuffer.lines[nextCaretLine].Length;
    10.                         }else if(parentLeaf !=null && parentLeaf.IsLit("}")){
    11.                             nextCaretLine = matchingBraceLeft.line;
    12.                             nextCharacterIndex = textBuffer.lines[nextCaretLine].Length;
    13.                         }
    14.                    
    15.                
    16.                                            
    17.                         current.Use();
    18.                     }else //--JumpTo
    19.  
    It's not perfect but I thought it was worth a share!

    It should move the caret to the brace position instead of the end of the line, tried but I couldn't get that to work.
    You could extend this to handle other types of brackets aswell.
     
    Last edited: Jun 15, 2020
    JoeStrout and Flipbookee like this.
  45. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,484
    I cannot reproduce the issue, so I guess this is something specific to your screen resolution and the scaling Unity applies to convert between logical size units and pixels on the screen. There's a disagreement in setting and getting values to the "position" property of an "EditorWindow" in Unity - the last value set is rarely equal to the value it will be returned after that...

    Anyway, I think I did a good workaround for this now and I need your help to verify it's working. I'll PM you with the changes in a minute. :)
     
    haywirephoenix likes this.
  46. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    You were right, and it works!

    I wondered if it has something to do with dpi scaling and in fact if you enable "Use default desktop setting" under UI Scaling in unity preferences it doesn't happen. Ludiq Peek also suffers from the same issue.
    With your fix, I can use custom scaling without it happening.

    Thanks so much for looking into it.
     
    Flipbookee likes this.
  47. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,068
    Hey there, I have owned this for a few years but have not really used it, as the first time I went to try it out I got frustrated because every script I went to open automatically opened in SI3 instead of Rider, and at the time I could not figure out how to set the default back to Rider while still having SI3 installed.

    I figured I would revisit this and see if there is a way that I can selectively open/view scripts within SI3 for quick edits and changes while still keeping the default editor as Rider?

    Thanks,
    -MH
     
    Flipbookee and Stexe like this.
  48. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    You can have this functionality, simply go to Edit > Preferences > Script Inspector > General and check "Always Open in External IDE". Also note the checkboxes below for "Open on Double Click".
    Also check Preferences > External Tools and see what your External Editor is set to.

    You can also single click on a Script, Text or Shader to quickly edit it in the inspector window.
     
    Flipbookee and Stexe like this.
  49. Fashtas

    Fashtas

    Joined:
    Jun 29, 2018
    Posts:
    11
    Only been using your tool for a short while and I am seeing frequent crashes with it and corruption of the scripts (In memory only)

    Seems to happen in a similar way each time:

    1) I drag and select a section of code, either in the tab editor or in the inspector
    2) I am unsure as to what happens next as I am not expecting it, I may either delete the text I have highlighted or extend the selection or select more text (or something else)

    The common part I am sure of is it happened selecting some of the script with a click-mouse drag.

    At this point the chunk of highlighted text is deleted from the in memory script (The script on disk is still untouched)
    I cannot save the script (button greyed out) and I cannot Undo (Button greyed out)

    Unity 2019.4.4f1

    And the following exceptions are displayed in console (Added below, they are large)

    Code (CSharp):
    1. ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
    2. Parameter name: startIndex
    3. System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <fb001e01371b4adca20013e0ac763896>:0)
    4. FGTextBuffer.GetTextRange (FGTextBuffer+CaretPos from, FGTextBuffer+CaretPos to) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:1077)
    5. FGTextBuffer.RegisterUndoText (System.String actionType, FGTextBuffer+CaretPos from, FGTextBuffer+CaretPos to, System.String text) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:1483)
    6. FGTextBuffer.InsertText (FGTextBuffer+CaretPos position, System.String text) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:1750)
    7. ScriptInspector.FGTextEditor.ProcessEditorMouse (System.Single margin, UnityEngine.Event current) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:4940)
    8. ScriptInspector.FGTextEditor.DoGUI (System.Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:4181)
    9. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (System.Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2043)
    10. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:1821)
    11. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1467)
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
    13. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    14. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
    15. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
    16. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    17. UnityEditor.HostView.Invoke (System.String methodName) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    18. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    19. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    20. UnityEditor.DockArea.OldOnGUI () (at <fd8fd784002f49beab0500d3a24213b9>:0)
    21. 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 <78b213560771414e9fa6f1b95f5ad8bb>:0)
    22. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    23. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    24. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    25. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    26. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    27. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    28. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    29. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    30. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    31. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    32. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    33. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    34. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    35. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
    36.  
    37.  
    38.  
    39. ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    40. Parameter name: length
    41. System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <fb001e01371b4adca20013e0ac763896>:0)
    42. FGTextBuffer.GetTextRange (FGTextBuffer+CaretPos from, FGTextBuffer+CaretPos to) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:1087)
    43. ScriptInspector.FGTextEditor.ProcessEditorMouse (System.Single margin, UnityEngine.Event current) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:5020)
    44. ScriptInspector.FGTextEditor.DoGUI (System.Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:4181)
    45. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (System.Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2043)
    46. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:1821)
    47. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1467)
    48. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
    49. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    50. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
    51. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
    52. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    53. UnityEditor.HostView.Invoke (System.String methodName) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    54. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    55. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <fd8fd784002f49beab0500d3a24213b9>:0)
    56. UnityEditor.DockArea.OldOnGUI () (at <fd8fd784002f49beab0500d3a24213b9>:0)
    57. 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 <78b213560771414e9fa6f1b95f5ad8bb>:0)
    58. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    59. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    60. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    61. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    62. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    63. UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    64. UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    65. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    66. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    67. UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    68. UnityEngine.UIElements.EventDispatcher.OpenGate () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    69. UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    70. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    71. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    72. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    73. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    74. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    75. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
    76.  
     
    Flipbookee likes this.
  50. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    89
    @Fashtas You're better off sticking to LTS builds with Script Inspector. 2019.4.1 is so close to your version.
     
    Last edited: Aug 4, 2020
unityunity