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. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    320
    Thank you for the response!

    Thank you!

    A tweakable number of scroll lines is much preferred! The only other reason it might be disabled is input lag. Sometimes, as pretty as something is, if it introduces more than 0.1s of delay, it can seem like "input lag", and can feel like a disconnect between the input and the output.

    I should probably add that I am hoping for folding of both #regions and functions!

    I find code-folding a way of keeping code that you're not working on out of sight. For instance, let's say you are working on a character controller and are designing an improved slope-cling algorithm. You may have your main clinging function, a handful of variables at the top of the script, and one or two utility functions that you are tweaking. There may be dozens of other variables and utility functions that are unrelated, however. Having these functions collapsed and variables divided into regions organized around the aspects of the character controller to which the variables relate can make jumping around in the code much quicker.

    Additionally, there is a sense of accomplishment for me when I finish a section, wrap it in a region and collapse it from sight. It's like checking off a todo list.

    Cool!

    Actually, I wasn't referring to only at the end of a script. If you are scrolling in Visual Studio and stop within the script itself, the top line will always be fully visible. In Si3, it may be partially cut off depending upon where you decide to stop scrolling. Apologies for any lack of clarity on that point.

    Ah. Bummer. No worries! To that I can adapt. :)

    Of course! It's always a pleasure to help when I have the opportunity/ability to do so!

    Thank you again! Be well!
    - S.
     
    Flipbookee likes this.
  2. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Did you ever get around to implementing auto code formatting aka Ctrl KD in VS? Also I noticed that when doing a switch statement the code is not indented between the braces, seems inconsistent with what i'd expect
     
    Flipbookee likes this.
  3. rosevelt

    rosevelt

    Joined:
    Oct 23, 2012
    Posts:
    47
    Hello,
    New here :)
    A few issues/questions please:
    * Tab navigation/history seems not to be working on my Unity.
    * As a mac user, is there a way to classically use the cmd key such as for word jump and so...
    * is there a way to have tabs show file names fully - all the time?

    Thanks!
     
    Flipbookee likes this.
  4. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hi @rosevelt and I'm sorry for my late reply! It was a crazy busy day today.

    Tab navigation history on OS X is bound to Alt-Tab and Alt-Shift-Tab shortcuts. Is that not working?

    I'm not sure what you mean exactly, but cursor movement in combination with modifier keys is fully configurable. By default it should match the native behavior of the host OS, but you can tweak that using these highlighted settings in Unity Preferences:
    upload_2016-2-16_22-40-42.png

    No, the size of tabs in Unity is hardcoded to 100 pixels and it's impossible to change that. But I guess you know that there is an option in Si3 to make them auto-expand on mouse-over so you can still see the whole name if it is longer.

    But if you get the tab switcher to work then you'll see that script names are shown in full there. ;)

    I hope this helps? :)
     
  5. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    I would say that code folding is the single most important feature for me when using any IDE.

    Code folding helps a lot in getting an overall picture of your script and makes refactoring a fun process. I am referring to function code folding and not region folding. I like to use regions scarcely as they provide a good mechanism for grouping your data but their overuse can cause more problems in the long run.

    Also code folding works incredibly well with the new feature in VS (Peek Definition) where you can peek at a function (and even modify it) without actually going to it, this way I can keep that code folded forever and if I need to see anything in there I can just take a peek :).
     
    Flipbookee likes this.
  6. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    No, not yet. Code formatting should come right after version 3.1 which got delayed a little bit, but I'm still trying to get it done as soon as possible. I had almost no time to work on that in the last two weeks and it's all this guy's fault:

    upload_2016-2-16_22-53-52.png
    (not an official poster of the game, but I like this one a lot)

    He's the one who has to be released on a fixed date and I am one of those who have to make that happen. ;) I hope you folks will have a chance to play the game and, trust me, you'll enjoy that very, very much! :D

    @punk: The indentation inside switch statements is intentionally made like that, but I know that might not be liked by everyone, so I'll add an option for that!
     
    punk and iamsam like this.
  7. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @S_Darkwell and @iamsam, thanks for your input! That still doesn't sound very convincing for me, but I'll read that again, maybe that will help... ;)

    Okay, this is a little bit more convincing, I never thought of that :)

    I might be not seeing the reason to use code folding because of my coding style. My functions are rarely that short for two of them to fit in my screen at the same time. I can rarely fit even one! :p I use a lot of Alt+Left/Right arrows, Ctrl+Shift+Up/Down, F12 and Alt+M for code navigation, so for me it really doesn't matter where are the functions as I can easily jump from one to another and then go back... But yeah, I can imagine how the lack of code folding affects you - it's like if I'd have to live without my favorite shortcuts.
     
    S_Darkwell likes this.
  8. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    Wow, are you on the development team of Hitman? I played the first version a lot but then work happened :(. All the best with the release :).
     
    Flipbookee likes this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Ah, that was quick, man! I thought it won't be that easy to guess ;)

    Yeah, the public beta started a few days ago and feedback is amazing so far. It's "the best Hitman game ever made"! :D
     
    iamsam and Novack like this.
  10. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    I miss code folding from my times with MD as well.
    In a very similar fashion to what S_Darkwell has explained, I liked to collapse functions that resulted irrelevant to the situation at hand, was very helpful navigating through a class without distracting similar names, or whatnot.

    It all comes to working mechanics. This includes coding style, but also the very way in which you use the tools. Your description of your working, with jumps from one function to another using shortcuts, seems very useful, Im definitively taking notes here :)

    Edit: Oh man! Working on the Hitman team! Awesome, "merde" with the beta!
     
    Last edited: May 7, 2016
    S_Darkwell and Flipbookee like this.
  11. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks :D

    Okay, I see, some of you really miss the code folding... So I'll have to finish that even though I don't think I'll ever use it ;)
     
    S_Darkwell likes this.
  12. SarperS

    SarperS

    Joined:
    Mar 10, 2009
    Posts:
    824
    Great to hear that you're on the dev team of the new Hitman game, hope it pays better than Si3! :) I'll let you know why I like Visual Studio when I have more time, incredibly busy for the next 10 days.
     
    Flipbookee likes this.
  13. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
  14. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    I was looking over an assets code and started to see this error...

    when these lines scroll into view..SI3 goes crazy with errors:
    Code (CSharp):
    1.             Quick<float>(ref preset.brushSize, "Brush Size", min:1, max:script.guiMaxBrushSize, tooltip:"Size of the brush in Unity units. Bigger brush size gives better terrain quality, but too big values can slow painting. Brush size is displayed as brighter circle in scene view. Brush could be resized with [ and ] keys.",  quadratic:true);
    2.  

     
    Flipbookee likes this.
  15. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey @bocs, this looks like a good find. Thanks for reporting it!

    It might be something related to using named arguments on a generic method call, so I'll check... Note that this error is coming from a Debug.LogException call in my code, so feel free to comment out that line to prevent spamming your console. I'm logging the exceptions coming from Si3's symbol resolver to let me see if something doesn't work as expected, so now that I know that it's okay to remove the logging. Si3 will continue to work as before ;)

    I'll have much more time to work on Si3 this weekend, finally, so I hope to get all the recent fixes and changes in shape to be released next week :)
     
  16. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Thanks

    if it helps narrow it down, the exception is coming from:
    public static ParseTree.Node ResolveNode(ParseTree.Node node)

    commenting out the Debug.LogException in that function is the one that stops the spam.

    also I tested by putting alot blank lines to see what was triggering it...
    in this example it doesn't like the slider:false



    Definitely an issue with named Arguments as you said.
     
    Flipbookee likes this.
  17. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @bocs, thanks for your help! I fixed it now.

    The named arguments in a call to a generic method were getting resolved in some specific part of my code that wasn't really tested and finished. Good that you found that :cool:
     
  18. phoenixrising

    phoenixrising

    Joined:
    Aug 9, 2013
    Posts:
    57
    Does this support break points?
     
    Flipbookee likes this.
  19. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    No, not yet, sorry. Debugging is on my TODO list, but please keep in mind that debugging within the same process is not a trivial thing to do. Nothing similar has been done in Unity so far, so it's also a trip in unexplored territory, but a very exciting trip as well ;)

    Si3 works nicely with external IDE's, so you can still use them for debugging when needed.
     
  20. MikeTeavee

    MikeTeavee

    Joined:
    May 22, 2015
    Posts:
    194
    Is there a way to fix the indentation for an entire file of code with one click? (like when you use document>format in monospace.)
     
  21. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    The easiest way to fix the indentation is to Cut and Paste a block of code or the whole content of a script. That's because Si3 applies auto-indent after Paste. Also while typing code the auto-indent gets applied automatically on the current line so normally you wouldn't have to explicitly ask for auto-indent unless the code was modified externally.

    Si3 is also applying auto-indent on lines moved up or down with Alt+Up/Down arrows. See this:
    MovingLines800.gif

    There's no a single click action for auto-indenting the whole script or selected block of code, but I can add that easily if needed? ;)
     
  22. MikeTeavee

    MikeTeavee

    Joined:
    May 22, 2015
    Posts:
    194
    Thanks for the tip! For now, holding down Alt + Down is a nice way to indent the entire document.

    An option to Indent-All under the "gear icon" in the upper right might be nice touch. Just an idea.:)
     
    Flipbookee likes this.
  23. SarperS

    SarperS

    Joined:
    Mar 10, 2009
    Posts:
    824
    That would be rad. But I think you should save it until it's more like an "auto-format" feature based on user-set rules. Some people like K&R 1 TBS style others like to put their curly braces on the next line, some don't indent their switch cases etc. etc.
     
    Last edited: Mar 23, 2016
    Flipbookee likes this.
  24. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Just wanted to say how much I love SI3. It really makes working in Unity more enjoyable. I've found that having to launch an external code editor is really cumbersome.

    Count me in for code folding support. It really helps to focus on what I need to concentrate on. Still SI3 is one of my best Asset Store purchases ever and recommend it to everyone.
     
    Novack, punk and Flipbookee like this.
  25. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    This asset looks really awesome and we will definitely purchase as soon as the Code Folding is implemented :p
     
    Flipbookee and Novack like this.
  26. FatIgor

    FatIgor

    Joined:
    Sep 13, 2015
    Posts:
    29
    Hi.

    Got myself the linux version of 5.3.4, which is working fine for me, so far as I can tell, nothing seems to have broken anywhere, apart from when it comes to copy and paste using SI3. (Not noticed any other SI3 probs.) I realise that linux version is not yet official, but I was wondering, does it work for other people, or am I just the only one that's been trying it?
     
  27. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    Hi,

    Does it work on Mac?
     
    Flipbookee likes this.
  28. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Of course it does, @Smokas! ;) It runs inside Unity Editor as an extension, so it's multiplatform :cool:
     
  29. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    OK - bought it, really FAST, as promised :)
    One small thing - the fonts (all of them) looks a little bit fuzzy. I am using Retina, so it is noticeable :(
     
    Flipbookee likes this.
  30. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @Smokas, can you please post a screenshot? What version of Unity do you use? There is support for retina displays in Unity 5.4 beta, but I don't know if that works better or not. I'd have to get myself one of those to see..
     
  31. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    I use Unity 5.3.4p4. There are screenshots: first - Inspector, second - MonoDeveloper:
    Screen Shot 2016-04-21 at 07.23.50.png Screen Shot 2016-04-21 at 07.24.53.png

    I also have Unity 5.4 on another computer installed - will check later.
     
  32. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    OK - the issue is closed, Unity 5.4 supports retina :) - here is screenshot from Inspector in Unity 5.4b15

    Screen Shot 2016-04-21 at 07.50.34.png
     
    Novack and Flipbookee like this.
  33. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    The small issue with 5.4:

    GetString is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'FGCodeWindow'.
    See "Script Serialization" page in the Unity Manual for further details.
    UnityEditor.EditorPrefs:GetString(String, String)
    ScriptInspector.FGCodeWindow:.cctor() (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:244)


    I moved code from constructor to OnEnable method - error disappeared.
     
    Novack and Flipbookee like this.
  34. baby_jeans

    baby_jeans

    Joined:
    Sep 1, 2015
    Posts:
    34
    Haven't noticed this before 5.3.4p4 but it seems like now when I have a script error, SI3 no longer is compiled to fix it and I'll have to open VS. Not sure if it's something in my scripts myself though.
     
  35. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @CaptainCatnip If there are compile errors at the time of opening a project, then yes, Unity will not load any scripts so you can only fix the errors with an external editor. But if the scripts stop working after compile errors while the project is open then that must be a bug in Unity itself. Is that the case?
     
  36. baby_jeans

    baby_jeans

    Joined:
    Sep 1, 2015
    Posts:
    34
    Yeah, it's the second. I'll update a class and cause some compile errors, and now SI3 disappears.
    Must be a Unity bug, yeah?
     
  37. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Yes, it's a bug in Unity 5.3.4p4 and 5.3.4p5, unfortunately. Unity unloads the assemblies when there's a compile error... :(
    It works fine in all versions from Unity 5.3.4f1 to 5.3.4p3. This also works in Unity 5.4 beta 15 and 16, which is good... I'll have to report the bug before it gets spread to 5.4 :p
     
  38. baby_jeans

    baby_jeans

    Joined:
    Sep 1, 2015
    Posts:
    34
    Awesome, that sounds like it'll get caught and fixed, thanks! Maybe I'll give 5.4 a shot now in the meantime. My project isn't anywhere near complete anyhow.
     
  39. DshFox

    DshFox

    Joined:
    Oct 10, 2013
    Posts:
    15
    Hi, I love SI3 but there is a thing that really pissed me off. When you make a change in code and go back to menu, appears a window asking for hold in memory or discard code. Man, I ALWAYS make changes, go to unity to check something and have to click in keep in memory. Can you please make an option to check always "Keep on memory" option(whitout appearing the window) or something like that?
    Thanks
     
    Flipbookee likes this.
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    That's a great suggestion! :) It should be very easy to modify Si3's code to make it always do "Keep in Memory" - just Find in Files for that string and modify the code around it ;)

    I'll add the option as well to allow that without modifying the code :cool:
     
    DshFox likes this.
  41. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey @DshFox, did you find out what needs to be changed in code? I checked that and it's in FGTextBuffer.cs in method called CheckSaveOnUpdate():

    Code (csharp):
    1.     public void CheckSaveOnUpdate()
    2.     {
    3.         EditorApplication.update -= CheckSaveOnUpdate;
    4.  
    5.         if (IsModified && editors.Count == 0 && !IsAnyWindowMaximized())
    6.         {
    7.             string path = AssetDatabase.GUIDToAssetPath(guid);
    8.  
    9.             switch (EditorUtility.DisplayDialogComplex(
    10.                 "Script Inspector",
    11.                 "Save changes to the following asset?          \n\n" + path,
    12.                 "Save",
    13.                 "Discard Changes",
    14.                 "Keep in Memory"))
    15.             {
    16.                 case 0:
    17.                     if (Save())
    18.                         AssetDatabase.ImportAsset(path, ImportAssetOptions.Default);
    19.                     //EditorUtility.SetDirty(AssetDatabase.LoadAssetAtPath(path, typeof(MonoScript)));
    20.                     break;
    21.                 case 1:
    22.                     FGTextBufferManager.DestroyBuffer(this);
    23.                     break;
    24.                 case 2:
    25.                     break;
    26.             }
    27.         }
    28.     }
    So here just comment out that whole "if" block and save it. The only active line inside this method will be the first one: EditorApplication.update -= CheckSaveOnUpdate;

    I hope this helps for now ;) but I'll also add an option to do that in Si3 Settings so that you won't have to modify my code.
     
    DshFox likes this.
  42. DshFox

    DshFox

    Joined:
    Oct 10, 2013
    Posts:
    15
    Thanks for this awesome tool and support! I always use in any game I am making.
    Good sells
     
    Flipbookee likes this.
  43. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    That's great to know @DshFox :cool:
    Thanks for the feedback!
     
  44. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Hey! How Hitman is going? I hope it gives you some time to get Replace, Rename and code folding... Those I think are pretty much the only pending stuff before having no excuses to work on Debugging! :D
     
    Flipbookee likes this.
  45. FatIgor

    FatIgor

    Joined:
    Sep 13, 2015
    Posts:
    29
    Working in Linux at last.....
    After switching to Linux a while ago, I discovered that cut and paste didn't seem to work, so I've been having to use monodevelop.

    This morning I've finally taken a bit of time and discovered that
    1) When accessing EditorWindow.focusedWindow via right click menu, it returns null.... A reported bug apparently, so Unity's fault.
    2) Having the system option of "show cursor when pressing control" turned on also de-focuses the window. Linux' fault. So having turned that option off, I can now Ctrl-c and ctrl-v again.

    Glad I sussed this out, I find Linux a much better working environment, and getting SI3 back is even better.
     
    Novack likes this.
  46. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    FYI Misspelled magic method...line 246

    Code (CSharp):
    1.         new MagicMethod<EditorWindow>("void OnSelectionChnage()"),
    2.  
     
    Flipbookee likes this.
  47. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Can you please add an always open in external editor option? Right now I can make all but the SI Console double click redirect to VS. But I have to set it both in preference and on the call stack popup.

    Preferably this option to switch 100% between SI and external would be mapped to a toggle short cut. Depending on the situation I'm typically in an all or nothing situation.

    Also you need to recheck your code because sometimes seemingly at random it's opening a script in SI when it ought to open it in VS. (Especially the project view double click)
     
    Flipbookee likes this.
  48. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks @bocs! I've fixed it just now :)

    @UnLogick That's a great suggestion! I'll add the option... But I haven't noticed that issue on double-click. I can still check the code though.
     
  49. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey, hey! It's Script Inspector's birthday - it turns 4 today. Hooray!!! :D

    And there's no better way for an asset to celebrate its birthday than getting another amazing review from a happy user, like this one:

    upload_2016-5-30_8-46-5.png

    Thanks Shane, and thanks to all of you for being around for soooo long! :cool:
     
    Tinjaw likes this.
  50. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Congratulations man! 4 years... o_O
     
    Flipbookee likes this.