Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    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,500
    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:
    25
    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,500
    @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. rainmax

    rainmax

    Joined:
    Jan 31, 2018
    Posts:
    13
    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. rainmax

    rainmax

    Joined:
    Jan 31, 2018
    Posts:
    13
    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,500
    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,500
    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:
    13
    hello, is it possible to disable SI Console ?
     
    Flipbookee likes this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,500
    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. :)
     
unityunity