Search Unity

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,546
    Yes, I know. Inline declarations for out variables (added in C# 7.0) is next on my to-do list to support in Si3.
     
  2. jensen_305

    jensen_305

    Joined:
    May 15, 2018
    Posts:
    27
    Script Inspector > Editor > Unity Magic Methods > Opening Brace on same line

    Seems to completely ignore this option. Btw outside observer. No idea what a Unity Magic Method was. Those are Unity Methods. Nothing magic about them. Weird extra word to add confusion I guess.

    code deleted because irrelevant.

    Ok I get it you can only control braces in Unity methods. Ehh. I'll stick with VS Studio. I don't see auto formatting either and I'm a messy coder with specific requirements like braces on same line. Seems like a cool plugin though.
     
    Last edited: Mar 26, 2021
  3. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    @jensen_305, the Opening brace on same line option is only for the Unity magic methods and it's applied when they are auto-generated by Si3. Sorry, that wasn't clear enough, I guess.

    Unity magic methods are the methods Unity calls through Reflection on objects of a type derived from MonoBehaviour, EditorWindow, Editor, ScriptableObject, ScriptableWizard, or AssetPostprocessor class. These are not virtual methods declared in the base classes or methods declared in an interface. Instead, these are methods that, when added with the exact method signature, get magically called by Unity through Reflection, even though no code is referencing them. So yeah, there is something "magical" about them and they are special in that aspect at least.

    Unity scripting documentation refers to these methods as "Messages", I guess as an analogy to the misleadingly named SendMessage, SendMessageUpwards, and BroadcastMessage methods of MonoBehaviour which also call methods through Reflection.

    So, since these magic methods are not declared anywhere, a code editor doesn't know their signature, thus it cannot help to declare them with the exact method signature. But since Si3 is specifically made for scripting in Unity, I hardcoded it to allow auto-generating all those methods. Most people at that time were calling them Unity Magic Methods, so naturally, I adopted that terminology.

    Later on, Visual Studio Tools for Unity copied that feature (although, not as nice as it works in Si3 IMHO) using Unity Scripting docs terminology and calling them "Messages". If you ask me, I'd say there's nothing messagy in them ¯\_(ツ)_/¯

    Anyway, sorry for the rant, I just wanted to explain the option only controls where Si3 would place the opening brace on generating any of these methods, so it would match your preferred style and the surrounding code. It doesn't control automatic code formatting if that was what you were looking for, simply because there is no auto-formatting feature in Si3 yet (it has auto-indent though).

    Auto-formatting is a highly demanded feature, and it will be added soon-ish, but for now, it isn't there yet. Sorry if that's a deal-breaker for you! Either wait for it to be added or I can arrange a refund?
     
  4. valmyr

    valmyr

    Joined:
    Jan 31, 2018
    Posts:
    17
    Hi, just like to tell you that this is a really useful tool!

    how can we make shift+delete after highlighting text to work similarly to ctrl+x?

    Also renaming of variables and methods would be very useful. I find myself going to vs just to do that. If we could have that, it will significantly minimize the need to use VS.

    I also noticed some descriptions are not being displayed when you hover on them. Ex. SceneManager.
    But there is a description in VS.

    SI3:
    upload_2021-4-11_18-19-33.png

    VS:
    upload_2021-4-11_18-19-52.png
     
    Flipbookee likes this.
  5. valmyr

    valmyr

    Joined:
    Jan 31, 2018
    Posts:
    17
    This one should be an error but SI3 is not highlighting it.

    upload_2021-4-11_18-28-40.png
     
    Flipbookee likes this.
  6. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Thanks @rainmax! :cool:

    Yes, I can bind Shift+Delete to the Cut command.

    Rename refactoring feature is in development and it will be released soon.

    Descriptions for Unity symbols need to be updated, thanks for reminding me to do that!

    And for the last one, Si3 is not highlighting all semantic errors but only some of them, mostly those that would break auto-completion and resolving symbol types. It highlights all syntax errors though. This is because of the shortcut I had to take - I wrote all the parsing and semantic analysis for C# code from scratch, which took me almost 9 years so far, and I'm still working on that, trying to complete the syntax for C# version up to 7.3 (a few things still left there). If I was implementing all the possible errors along the way, I would have to cut on something else.

    Unfortunately, Roslyn didn't exist yet at the time when I started this project - using that would have saved me a couple of years of work. Now it exists, and I'm considering switching to it in the future if that doesn't hurt the performance.
     
  7. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Fun fact: Did you know there are some assets on the Asset Store with more 5-star reviews than Si3?

    Hehe, I'm kidding ;) I know you know, but I bet you didn't know there are only 17 of those!

    My highest respect to the authors - this is the list (non-free, five-star assets only):
    1. Playmaker - 442 five-star reviews
    2. Gaia Pro - Terrain & Scene Generator - 424
    3. Gaia 2 - Terrain & Scene Generator - 408
    4. Corgi Engine - 2D + 2.5D Platformer - 328
    5. Dialogue System for Unity - 308
    6. Rewired - 302
    7. Pro Camera 2D - The definitive 2D & 2.5D Unity camera plugin - 297
    8. Easy Save - The Complete Save Data & Serialization Asset - 281
    9. Odin - Inspector and Serializer - 263
    10. UFPS: Ultimate FPS - 242
    11. Amplify Shader Editor - 236
    12. Adventure Creator - 216
    13. EasyRoads3D Pro v3 - 215
    14. Behavior Designer - Behavior Trees for Everyone - 208
    15. Easy Movie Texture (Video Texture) - 208
    16. NGUI: Next-Gen UI - 205
    17. Third Person Controller - 205
    And next is Script Inspector 3 with its 201 five-star reviews :rolleyes:

    Thank you all for making Si3 one of the top 20 assets of the entire Asset Store! :cool:
     
  8. Lorrak

    Lorrak

    Joined:
    Sep 17, 2019
    Posts:
    17
    hello, is it possible to disable SI Console ?
     
    Flipbookee likes this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Yeah... It opens automatically if the built-in Unity Console window is open. So if you're using another console alternative and don't need the built-in Console window, just close it and also close the SI Console. If you don't use an alternative console, then you probably want to use the SI Console instead of the built-in Console because it gives a couple of additional options not available in the built-in Console:
    • Right-clicking the entries in the SI Console allows easy navigation through the call stack leading to them.
    • It allows changing the font in it to a monospaced font.
    • It offers some options to automatically focus the SI Console.
    The newer versions of Unity also allow navigating through the call stack, but not as easy as in the SI Console. In the past when that option was missing in the built-in Console, this feature of the SI Console was much more helpful, but these days some may find it not essential. If that's why you're asking how to disable the SI Console then do this, please:
    • Open the FGConsole.cs script (use Alt+Shift+O on PC or Alt-Cmd-O on Mac to quick-open any script).
    • Go to line 159 (Ctrl+G on PC or Cmd-G on Mac). There should be a method called OpenIfConsoleIsOpen().
    • Comment out or delete all the code in that method.
    • Save the changes to FGConsole.cs and then let Unity compile that.
    • Close the SI Console window and it won't open automatically anymore. You can still open it through the main menu: Window -> Script Inspector 3 -> SI Console.
    I hope this helps. :)
     
  10. Finity

    Finity

    Joined:
    Jan 25, 2013
    Posts:
    10
    The following is not valid in SI3. Why?
    Code (CSharp):
    1.  
    2. private void OnTriggerEnter(Collider other)
    3. {
    4.     if(other.gameObject.TryGetComponent<MyObj>( out var myObj))
    5.     {
    6.     }
    7. }
    8.  
     
    Flipbookee likes this.
  11. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Yes, that's because the myObj variable is declared "inline", which is a feature of the language added in C# 7.0 and the version of Si3 on the Asset Store doesn't support that feature yet, but it will support that with the latest update that I'm planning to release later today.

    This issue was pointed out by @jensen_305 already and I confirmed that's the next thing I'm going to work on:
    However, I didn't expect it's going to be that complicated to support that!

    The issue was that to deduce the type of the myObj variable in your code example, Si3 has to resolve the overloaded method TryGetComponent. And to resolve the overloaded method, it needs to know the type of each argument passed to the method call. So, that was a chicken-egg situation that took me quite some time to solve and adapt the existing code to deal with that...
     
    Finity and valarus like this.
  12. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Hiya friends! Guess what's new? :)

    Script Inspector 3
    version 3.0.29
    got just released on the Asset Store

    And this is what's new in it:
    • C# 5.0-7.3 support:
      • interpolated strings with syntax highlighting and autocomplete
      • inline out variable declarations
    • Full support for Chinese, Japanese, and Korean characters
    • Workaround for Unity's buggy positioning of the composition popup window
    • New code snippets: "prop" and "propg" - thanks @RGAMESR
    • Updated Visual Studio Dark color theme to match VS 2019
    • Improved resolving of method overloads
    • Reduced recursion depth for C# semantic analysis
    • Fixed semantic analysis of void delegate types
    I hope you'll enjoy this free update. :cool:
     
  13. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Well, I tried and it didn't work because Unity counts those files as "native" assets for which we can't override the built-in inspector in the way we can do that for any other type of asset... Except for the .js files which Unity sees as UnityScript files.

    Next, I'll try to allow editing those files in standalone Si3 windows, at least.
     
  14. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Oh, it looks like I forgot to mention one additional item in the list above:
    • Workaround for GUIStyle.Draw exception on Linux
     
  15. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    336
    Hello,

    When will code folding be available?
     
    Flipbookee likes this.
  16. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    I hope I’ll get back to that very soon. While adding support for CJK characters, I noticed I wasn’t too far from completing that task. I also simplified some parts of the text drawing code that should make the code folding feature easier to complete.
     
    Lars-Steenhoff likes this.
  17. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Oops, it looks like the latest Si3 update completely broke autocompletion for projects working on C# 4 only :oops:

    I'm very sorry about that! I'm fixing that immediately, so expect a critical update today...
     
    zKici likes this.
  18. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Attention - Critical Update!

    Script Inspector 3
    version 3.0.30
    got just released on the Asset Store

    This is what's new in it:
    • CRITICAL FIX: Fixed autocompletion for C# 4
    • C# 5.0-7.3 support:
      • Throw expressions
      • Default literal expressions
      • Fixed scope of inline declared out variables
      • Fixed autocomplete for "var" after "out"
      • Fixed resolving type of implicitly typed out variables in arguments of a generic method call
    • Fixed positioning of IME composition window in the Inspector of Unity 2019+
    • Fixed warning in Unity 2021+ about obsolete API
    • Fixed opening log entries in SI Console in Unity 2021+
    • Fixed positioning of Si3 floating windows in Unity 2019.4+ - thanks @jrDev
    • Fixed custom property drawer for UnityEvents to find its target set to a static member
    • Fixed resolving type of integer literals
    • Optimized resolving concrete generic types

    Not many new features, mostly bug fixes, but there wasn't much time for anything more than this since the last update.

    Happy coding! :cool:
     
    Last edited: May 30, 2021
  19. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    I almost forgot to mention... Today is Script Inspector's birthday ;)

    upload_2021-5-30_0-32-9.png
     
  20. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,782
    @Flipbookee Is this possible? I'm here playing with jslib files and they are a mess in VS...

    Thanks,
    jrDev
     
    Flipbookee likes this.
  21. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    I tried and this was my reply to that post:

    So yeah, I'll try again and for sure it won't be possible to edit them in the Inspector window, but eventually only in the standalone SI tabs.
     
  22. Derek_Brouwer

    Derek_Brouwer

    Joined:
    Nov 25, 2016
    Posts:
    2
    I have a question.

    I'm wondering where you are writing the tool's preferences to?

    I was going to try convince my team to add this to our project, but wanted to know where the user preferences were saved so I can make sure they are being ignored by source control. That way people can choose to have it replace their external tool or use it only if they need it.

    Separate thought, would there be a downside to just ignoring the entire Plugins/Editor/ScriptInspector3 folder (if it's not writing to anywhere outside this folder)?

    Thanks!
     
    Flipbookee likes this.
  23. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Si3 saves its preferences in EditorPrefs, so yeah, they'll be ignored by source control.

    Yes, the whole folder can be safely excluded from source control.

    Wait, I'll send you a copy to try it out before you decide. ;)
     
  24. Derek_Brouwer

    Derek_Brouwer

    Joined:
    Nov 25, 2016
    Posts:
    2
    Thank you for the info and fast reply!

    I already have a copy myself, but thank you for the offer :)
     
    Flipbookee likes this.
  25. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Woot?!? Script Inspector 3 is 50% off currently on the Asset Store ;)
    upload_2021-6-29_8-41-42.png
    Check it out here: http://u3d.as/2ZC

    And don't forget to read all the glowing reviews!
    Well, okay, maybe not all because it has more than 200 five-star reviews! :cool: (yes, more than two hundred, not a typo)
     
    Lars-Steenhoff likes this.
  26. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    I hope this weekend to finish and release another update that includes an important fix for the tab characters not indenting the code beyond a certain level depending on screen dpi in combination with the chosen font and font size.

    Besides that, it has many other tiny fixes you may never noticed, and it has better support for latest C# features, one of which is the support for tuple types, although I’m not sure if I can fully finish that in time for the release - it’s quite a complex feature, but let’s keep the fingers crossed ;)
     
  27. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Just a friendly reminder :rolleyes: This offer expires in less than 24 hours

    Check it out here: http://u3d.as/2ZC
     
  28. new_coin

    new_coin

    Joined:
    Feb 17, 2013
    Posts:
    3
    Hi, SI3 helped me a lot, thanks for the product.

    Can you please write what commands SI3 adds to component context menu/kebab menu? I know it adds "Edit in Script Inspector" for one.

    I made some wrong clicks due to an unrelated issue and trying to make sure I didn't break stuff.
     
    Flipbookee likes this.
  29. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    :cool:

    Yes, it adds that and if there's an Editor class for that component type, it also adds "Edit this Editor class":
    upload_2021-7-10_19-48-27.png
     
    AthrunVLokiz likes this.
  30. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Wait, what?!? Script Inspector 3 is on sale again :eek:



    Another chance for anyone who missed it a week ago - now again at a 50% discount and you save $20
    http://u3d.as/2ZC
     
    Lars-Steenhoff likes this.
  31. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    314
    Hi
    Can Si3 edit scripts that are not physical files?
    For example, I planing to store some script code in ScriptableObject as a serialized string.
    Is there an API to open and edit the script from the string?

    Thanks

    UPD
    If there is no such API then how difficult it would be for me to implement this by myself?
     
    Flipbookee likes this.
  32. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Hey @MUGIK, sorry for the late reply...

    Well, there is a method in FGTextBuffer called InitializeWithCSharpCode which was doing exactly that some long time ago, but I'll have to find a code example of how to use that method and it may need some updating because it's been quite a while since I added and used that. It isn't called anymore, so it may be outdated now, but I'll check that too.

    This method was part of my attempt to create an immediate window with full autocomplete, which I had to put on hold while working on other more urgent issues.
     
    MUGIK likes this.
  33. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    314
    Thanks for the reply! You could ignore my previous post, I gave up on that idea. Sorry for bothering you.
    Have a nice day!
     
    Flipbookee likes this.
  34. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Okay, no worries :)
     
  35. iloveloon

    iloveloon

    Joined:
    Sep 18, 2019
    Posts:
    1
    Hi, almost perfect IDE for me so far, do you have plan to implement replace text in selected area and code folding?
     
    Flipbookee likes this.
  36. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Hey, thanks @iloveloon! :cool:

    Yeah, I think I can easily add an option for Replace All to work on the selected text only. Code folding is on my to-do list and already half done, although on hold currently while I'm working on something much more important - finishing support for the latest versions of C# that are now supported in Unity.

    Thanks for sharing your experience with Si3 and what you'd prefer to see next in it! :)
     
    iloveloon likes this.
  37. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Just a friendly reminder to anyone interested in using Si3 that the sale ends in less than 24 hours... Apologies to everyone else for the spam.
     
    iloveloon likes this.
  38. valmyr

    valmyr

    Joined:
    Jan 31, 2018
    Posts:
    17
    HI, I managed to add support for SHIFT+DEL and SHIFT+INS by modifying FGKeyboardHook.cs.

    Hoping you could add support for F2 rename symbols and more descriptions on hover. I bind it to "Replace in Files" in the meantime in that same file.
     
    Flipbookee likes this.
  39. valmyr

    valmyr

    Joined:
    Jan 31, 2018
    Posts:
    17
    Also, here are some additional lines where SI3 should display as errors but does not:

    upload_2021-9-21_18-8-6.png

    Note the datatype and the value.
     
    Flipbookee likes this.
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,546
    Nice! Could you send me the changes, please? :)
     
unityunity