Search Unity

Utilities Script Inspector 3

Discussion in 'Tools In Progress' started by Flipbookee, Aug 10, 2013.

  1. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
  2. mustafa

    mustafa

    Joined:
    Jun 4, 2012
    Posts:
    24
    I miss refactoring.
     
    Flipbookee likes this.
  3. mustafa

    mustafa

    Joined:
    Jun 4, 2012
    Posts:
    24
    But I still love the editor. IT IS awesome.
     
    Flipbookee likes this.
  4. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @mustafa, I miss refactoring as well! ;) Rename Refactoring comes in version 3.1 (first next update) and the plan is to get much more than only that. Auto-adding using statements, auto-implementing interfaces, extracting methods, inlining methods, extracting expressions to local variables and other goodies like that will be added next :cool:
     
  5. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Bad news since a long time ... I'm using Unity 5.3.1 on Windows 10 and SI v3.0.12

    Code (CSharp):
    1. ArgumentOutOfRangeException: Argument is out of range.
    2. Parameter name: index
    3. System.Collections.Generic.List`1[System.String].get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    4. ScriptInspector.FGTextEditor.ProcessEditorMouse (Single margin, UnityEngine.Event current) (at Assets/_Template/ThirdParties/ScriptInspector3/Editor/Scripts/FGTextEditor.cs:5075)
    5. ScriptInspector.FGTextEditor.DoGUI (Boolean enableGUI) (at Assets/_Template/ThirdParties/ScriptInspector3/Editor/Scripts/FGTextEditor.cs:4487)
    6. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (Boolean enableGUI) (at Assets/_Template/ThirdParties/ScriptInspector3/Editor/Scripts/FGTextEditor.cs:2866)
    7. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/_Template/ThirdParties/ScriptInspector3/Editor/Scripts/FGTextEditor.cs:2722)
    8. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/_Template/ThirdParties/ScriptInspector3/Editor/Scripts/FGCodeWindow.cs:1169)
    9. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    10.  
    Seems that I also got crazy memory jumping up after SI3 being imported, you may have a look, I haven't test on other project / computer yet so can't say for sure
     
    Last edited: Jan 14, 2016
    Flipbookee likes this.
  6. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks man, looks like a nice find! :) I'll fix it...

    What do you mean exactly? If you mean the memory consumed by Unity, then yes, Si3 needs memory as any other plugin. It read, stores and caches a lot of data to be able to work fast. Still at the end the difference in memory consumed by Si3 is order of magnitude lower than what Visual Studio or MonoDevelop would require even without opening a solution!

    Still, as I haven't checked this more recently I'll take a look and check what's going on... There might be some room to optimize that ;)
     
  7. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I think that you already saw the twitter post about that. If I'm wrong please let me know so I'll ask.
     
    Flipbookee likes this.
  8. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Yes, there was a ReSharper extension for that. So far it looks very useful but it's still trying to melt my CPU down! Haven't they heard of incremental parsing and analysis? There's no other way - I'll have to add Heap Allocations Highlighting to Si3 now :D
     
    mcmorry likes this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @thienhaflash Seems like you've moved Si3 to this folder:
    Assets/_Template/ThirdParties/ScriptInspector3/...

    Which is not good - Si3 has to go in the first-pass editor assemblies in order to function as it's supposed, so please move it to Plugins/Editor/ folder. ;)

    This will also reduce the compile time when you edit non-first-pass scripts!

    However, the error doesn't seem to be related to that...
     
  10. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    @Flipbookee : I know the reason why you put it in the Plugins folder but in this case I can not, I need to create a template that the basic requirement is everything would be inside the _Template folder :) Thanks for your reminder anyway :)

    For the memory thing, I got about 6GB and crash where it normally would be about 1GB of memory in used. Not sure if that related to Unity5.3.1 or not. The memory problem stops when I removed ScriptInspector3, I haven't check this very carefully yet but maybe I'll try again later ... Can't live without SI3 these days :)
     
  11. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Bad news for today, SI v3.0.12, Unity 5.3.1f1 on Windows 10. I was typing something like this, might because my path variable can not be resolve, it's being used before declared ...
    Code (CSharp):
    1. var path = ScriptableObject.CreateInstance<AB2_cha>(path);
    Code (CSharp):
    1.  
     
    Last edited: Jan 18, 2016
  12. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Great find, man! I'll fix it...

    I've fixed the other one you found. :)
     
  13. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I have a feature request for you, @Flipbookee. The SI Console is awesome, but one more feature would make it beyond awesome:

    A "filter" field in the SI Console: user can type something there, and you show only the console messages that contain that text, hiding all other messages.

    I've spent so much of my life scrolling through 500 Debug.Log messages looking for the one thing I need... and in most cases, I know exactly a word or two I could type to find it. But neither Console nor SI Console has a Find feature, and even better than Find would be a filter, since then I would usually be able to instantly reduce the output to just the stuff I care about at the moment.
     
    I am da bawss and Flipbookee like this.
  14. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey @JoeStrout, I don't know if you know that, but the SI Console is only a mirror of the original Unity Console with some extras on top of it. The way it works is described in one of my older posts here... I can easily add things on top of the existing functionality, but remove something is more difficult. Adding a filter field requires removing log entries and I'm not sure if I can do that, but searching should be easy - this needs adding a search field and changing the focussed entry.

    Thanks for the idea! :D
     
  15. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Ah, I see. This makes me sad. :( I mean, I get that doing it this way saved you some work... but coming from the guy who wrote multiple full language parsers from scratch just to support Autocomplete, it seems funny that you would shy away from reading and displaying the log messages yourself!

    So, yeah, a search function would be better than nothing... but not nearly as good as a filter function. And it'd be great to not have to have both Console and SI Console open, too. So, I hope you'll reconsider writing your own console at some point, because I just know it would end up far awesomer!
     
    I am da bawss and Flipbookee like this.
  16. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @JoeStrout, yeah that's a good point... :p I'm just afraid once I start working on my own console I won't be able to stop before I get the dream console I always wanted to have! I used to work in a big team where all the game logic was relying on Lua scripts and we had no debugger for it, so everyone was just adding more and more log messages until the log became a huge mess. Trying to find your own log messages was getting trickier every day, so I wanted to make a log viewer that will actually be useful, but release schedule was too tight for anyone to afford making that. Still the same ideas could be used now in Unity. Basically we can have a console that's fancy enough to let us do easy filtering by content, by source from certain a script or any scripts in a sub-folder, pause the game whenever a certain log entry appears and maybe auto-open the script in Si3, highlight, group/collapse, count, search etc... :cool:

    At this particular point I still see the debugging as a far more important missing feature than an improved console. I still need some help with that if anyone feels like contributing a small part for it - there's a not too big task where a chunk of C# code needs to be translated to C++. This is the debugger's communication protocol that goes over a socket, so I need that part only written in C/C++ or Objective-C. It will be a native plugin that starts thread which then connects to a socket and communicates with the Mono runtime... Any takers?
     
    I am da bawss likes this.
  17. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574


    I second that, I would love to see a filter function for the console too!
     
    Flipbookee likes this.
  18. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Now you are just making me wet! :D
     
    Flipbookee likes this.
  19. Victor_Kallai

    Victor_Kallai

    Joined:
    Mar 5, 2014
    Posts:
    123
    @Flipbookee I would be more than happy to help you out, but unfortunately my C++ and Objective C skills are not that great, probably it would take you more time to explain me the project, that to do it yourself.
    On another topic, I want to ask you if you are still working on a 'Format Document' feature, that would really improve my workflow. If this is something to be implemented in c#, I would be really glad to help you with.
     
    johanneskopf and Flipbookee like this.
  20. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @Victor_Kallai Yes, auto-formatting is still a must have feature, even more now as soon it will be used for some of the refactoring features. Any help with that will be highly appreciated! :) If you could for example add the formatting options to SISettings.cs that will be of great help for me! If you check the script you'll see it shows three tabs for three different categories of options. Add one more for Formatting in the same fashion and put all the options in it. Then I'll implement the code formatting for each of them, one by one. That part is a bit more complicated, so there's no point for you to bother with that. Just having all the options listed in the settings will be of great help for me as I can have a clear overview of what needs to be done and I can track my progress. Don't bother with a preview - I'll add that at the end once the formatting starts to work ;)

    Let me know if anything in SISettings.cs doesn't make sense, but it should be pretty straight forward and easy... Thanks a lot in advance!!! :cool:
     
  21. Victor_Kallai

    Victor_Kallai

    Joined:
    Mar 5, 2014
    Posts:
    123
    @Flipbookee

    Here are some information on the subject, maybe this can help you to implement it:
    - Automatic code formatter GitHub: http://blogs.msdn.com/b/dotnet/archive/2015/02/09/automatic-code-formatter-released-to-github.aspx
    - Documentation/coding-guidelines/coding-style: https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md

    Now for the SISettings.cs, I've tried to make a settings tab, too bad you can't resize the Unity Preferences Window - (maybe we can make a custom settings window only for SI3 ?)

    All the tabs I've made are based on ReSharper - basically I've copied some of them just for demo purposes. If you want, I can copy all the options from the ReSharper, but that depends on which ones do you want to implement.
    Let me know what you think.

    https://dl.dropboxusercontent.com/u/272758715/SISettings.cs
     
    Flipbookee likes this.
  22. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks man! :) I haven't had a chance to check anything yet, but I'll do that - thanks for the links and the script :D

    Yeah, we can't resize the Preferences window, but I should be able to show that in a resizeable window as well.
     
  23. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    I notice that the theme being changed automatically sometime, I always set to use Monokai (dark) but sometimes SI3 automatically revert to light theme. This happens after I select a class inside an dll.
    I made a shot so you can have a look


     
    Victor_Kallai and Flipbookee like this.
  24. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks @thienhaflash! Good find. It sounds like an easy fix and I'll take care of it ;)
     
  25. koblavi

    koblavi

    Joined:
    Oct 1, 2010
    Posts:
    52
    Hey @Flipbookee ! Once again thanks for your awesome work on Unity's default code editor, also sometimes known as SI3 :p. You might remember me from my asset store review; The dude who dared to give SI3 4/5 stars instead of the standard 6/5. You might also remember that I had a not so tall wish list, but I'm here to talk about something else: The Debugger:eek:.

    I went through quite a bit of this thread and have seen how hell bent you are on making this happen (In defiance of Unity's own opinion on the subject of an in-editor debugger). Also noticed your call for assistance on some code translation tasks. Before you get too excited and jump to the conclusion that I'm offering my help, I'm gonna put it out there: I'm not your guy:(! Much as I wish I would like to help on this, I just don't have the bandwidth.

    But given how important this is to you and how much of a difference it would make to the community, I would like to contribute. I'm willing to foot up to $200 of the man-hours cost it would take to put out an in-editor debugger. Maybe it isn't a lot but I'm hoping others follow suite:). (And don't you dare try to decline :mad:)

    Why do I want to help? Well the short answer is that SI3 helped to revive interest in one of my shelved projects. Every time I felt like working on it, I got excited! and the I open MonoDevelop and it sucks all that excitement (like a dementor). SI3 gave me that excitement back so I want to give something in return.:rolleyes:.

    Also I just want to see the engineers at Unity Tech be like Whoooaaaaa:eek::eek:

    PS: Here's a prediction: If you pull off the In-editor debugger, Unity will throw a lot of cash at you to get you onboard the team. (They've probably approached you already I'm sure)
     
    Last edited: Jan 31, 2016
    Flipbookee likes this.
  26. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @koblavi Thanks man, that's a very generous offer! You know, I can't take that ;) - I also lack the bandwidth so I was hoping someone will chip in a little bit of their own free time just to get the ball rolling. Once it starts it will be very difficult for me to resist the desire to finish it as soon as possible! Yeah, UT engineers would also love to see the in-editor debugger, I'm pretty sure. :D

    Exciting times... :cool:
     
  27. koblavi

    koblavi

    Joined:
    Oct 1, 2010
    Posts:
    52
    Well, I guess we'll just have to wait a while then. Cos it looks like no one is willing to step up. I was thinking open-souring SI3 would be a good idea (Technically it already is). But then again, you'll be missing out on quite a bit of asset store cash.
    Ideally, if you had the bandwidth, how long do you think it would take you to get a version 1 out?
     
    Flipbookee likes this.
  28. koblavi

    koblavi

    Joined:
    Oct 1, 2010
    Posts:
    52
    Feature Requests;)
    Feature:
    Return to Last opened tab
    Details: If a code window which is docked in the main editor is in focus and the play button is pressed, the editor switches to the Game Tab as expected. It would be really nice if focus is restored back to the previous code window that just lost focus when you exit play mode (i.e. the stop button is pressed). Call it a mild case of laziness ;)
     
    Flipbookee likes this.
  29. noxoc

    noxoc

    Joined:
    Dec 5, 2014
    Posts:
    5
    Just bought it and already have a few questions :)
    1. Can I use another Color-Scheme? I'd love to have the Monokai theme. (Edit: found it!)
    2. Is there a way to change hotkeys? Eg. cmd+d (yup, mac user) to jump to definition
    3. I'd love to have the cmd-r feature from monodevelop (renaming variables/methods/classes including references) AFAIK that's a feature from intellisense/omnisharp (or whatever is running in the background.
    4. Is there a way to "jump to file" using a fuzzy search?
    5. An Overview of all Hotkeys would be really helpful.
    Otherwise so far, from what I can tell a really great plugin! Not sure if it'll replace my vim/monodev, but really great for quick-edits without the need to fire up monodev.
     
    Last edited: Feb 1, 2016
    Flipbookee likes this.
  30. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks @noxoc! :)

    You can use any of the built-in color schemes (Monokai is one of them) or create your own since the full source code is there. :cool: Switch to another color scheme from Si3's "gear" toolbar button in the upper right corner.

    Cmd-D is the shortcut assigned to Edit->Duplicate in Unity's main menu. If you wish you can change it to do something else in Si3, but you won't be able to change that menu item - it will still say "Duplicate" but it will be doing something else, whatever you'll change it to.

    So, to change Cmd-D from Duplicate to Go To Definition you'll first have to open FGTextEditor.cs (in Si3, of course) and search for the second occurrence of the word duplicate. That should bring you to this code block:
    Code (csharp):
    1.             else if (Event.current.commandName == "Duplicate" && TryEdit())
    2.             {
    3.                 CommandDuplicateLinesDown();
    4.                
    5.                 tryArgumentsHint = true;
    6.                 Event.current.Use();
    7.                 return true;
    8.             }
    This is the code that's processing Cmd-D which Unity transforms to a "Duplicate" command. So change this whole code block to this:
    Code (csharp):
    1.             else if (Event.current.commandName == "Duplicate")
    2.             {
    3.                 Event.current.Use();
    4.                 var symKey = Event.KeyboardEvent("%y");
    5.                 ProcessEditorKeyboard(symKey, false);
    6.                 return true;
    7.             }
    Now get ready to experience the magic! ;) Just save this change and let Unity compile and reload the assemblies. Once that's done try the changes - press Cmd-D and voila!!! :D Cmd-D is Go To Definition now! :cool: Congrats, you've just modified the source code of a code editor using that code editor itself, and the effects are immediately visible while the code editor is still running! Isn't that magical? :D

    Rename Refactoring is the feature I'm working on right now, please wait for it until I finish it! It was planned to be ready one week ago, but it isn't done yet and I need a few days more...

    By the way, there's no code library running in the background for Si3! No Intellisense, Omnisharp, NRefactory, or any other library that would slow Si3 down! Si3 uses it's own original code parsing and analysis engine built from scratch in order to be running at superfast speed inside Unity! ;) Otherwise you wouldn't be able to open the scripts instantly.

    The fuzzy search opens with Alt-Cmd-O on OS X. :cool:

    All the Si3 hotkeys for OS X are listed in this document:
    https://www.dropbox.com/s/x5t6t3mo1szi2ue/Si3 Hotkeys - OS X.pdf?dl=1

    Please check the _readme.txt for all the other links, such as @inventor2010's amazing keyboard plugin for Si3 ;)

    I'd love to hear will you still feel like that after a few days. It takes a little bit to realize all the advantages of programming with Si3 instead of MonoDevelop :p
     
    inventor2010 likes this.
  31. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @koblavi, this is a great idea! Not a original one though, ;) I've tried to do that in one of the recent updates, but something wasn't that easy as I expected. I don't remember what exactly was the issue, but it's possible that I ran out of initially allocated time. So I think I'll have to try again to do that. Thanks for reminding me! :)
     
  32. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Well, let's see... I'd need a day or two to do the breakpoints management, 2 or 3 days to modify the soft debugger library for Windows only, I guess only 1 day to adapt Si3 to run in a modal window, and let's say 2 days to glue everything together. That's 6-8 days of work to get the initial in-process debugger working.

    But to make that a bit more useful I'd also have to add a call stack window, which is 1 day only I guess, 3 days for the Watches window and a little bit more for the variables introspection on mouseover...

    It comes to 2, maybe even 3 weeks of full-time work. And I cannot work full time on Si3 because it's quite far from making enough money for one person to survive, so I have to keep my full-time job :p... So then if I work on it only part-time for at least a month I believe the initial version will be ready to go as another Si3 update :)
     
  33. noxoc

    noxoc

    Joined:
    Dec 5, 2014
    Posts:
    5
    Really Cool!! But won't updates overwrite this? Got any link to on how to extend the editor so that I can update without overwriting my changes?

    Keep up the good work!

    Updates:
    Few more update:
    • It takes ~1 second for the autocomplete to show up, whereas MonoDevelop's pops up instantly.
    • When I'm in maximized view, and then open a file using cmd-alt-o, it restores the window. It'd be waaay cooler if it stayed in maximized view.
    • When the file is (almost?) finished with compiling the editor inspector is blocked for about 3 seconds, and then "restarts" (highlighting off and then back on).
    • Also the AutoCompletion would be way better (easier to scan) if it included syntax highlighted method signatures of the currently selected method (see: http://noxoc.de/share/LuLBxT.png vs http://noxoc.de/share/690KR1.png).
    So far rather underwhelmed :/ Probably not going to make it as my default Unity Text-Editor.
     
    Last edited: Feb 1, 2016
  34. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Right... Until I finish the keyboard customization feature you'll either have to do that change again or I can make it be an option in Si3 preferences. Another way would be to add an extension point in Si3 to allow third party scripts scan and alter incoming events without need to modify Si3 source code... Adding the preferences option sounds like the fastest solution for now - I can get that in the next update.

    Hmm, are you sure about that? :confused: Is that only happening the first time you try to use it after a reload or after that as well? I know that opening a popup window in Unity on OS X is a bit slower than on Windows and that might be the reason. On Windows popup windows open immediately, while on OS X Unity creates them on another thread and they are showing up slightly delayed, but that shouldn't take that long... I'll check!

    Yes, I understand. I did that to avoid opening the other script in a floating tab instead of being docked next to the other scripts, but it should be easy to re-maximize the tab automatically in this case... I guess you're working on a single monitor, right?

    Unity always compiles in a background process and we are still allowed to use the Editor as there's nothing happening. If the compile fails there will be no interruption, but if it succeeds then interruption is unavoidable because Unity unloads the whole AppDomain and creates a new one with the newly compiled assemblies. Before unloading it also has to serialize the full state of the Editor and deserialize it after reloading, and during this process the Editor is unresponsive. It has to be and it happens always, with or without Si3.

    Once that finishes, Si3 has to re-highlight the scripts because that data is not serialized so it needs to be reconstructed. I chose to not serialize this data and all the parse trees and results of semantic analysis in order to reduce the period of unresponsiveness (less data => faster processing), but then that's very noticeable in highlighting... There's room for improvement in this part of Si3, so I'll look into that!

    Yes, I know that, but I haven't done that part yet. :p It's still on my TODO list ;)

    Well, I'm really sorry to hear that! Thanks for sharing your impressions and pointing out the weakness points. It's extremely helpful for me to know what may be the reasons for holding you guys back in choosing Si3 as your default editor. And of course, I'll do my best to improve Si3's chances to win your hearts more instantly, as I always do :rolleyes:
     
    noxoc likes this.
  35. noxoc

    noxoc

    Joined:
    Dec 5, 2014
    Posts:
    5
    Cool! :D

    Here's a video: http://noxoc.de/share/HV09Aq.mp4 o_O

    If there's anything I can do to give you some profiling insights, just let me know.

    Yes. It's kinda disturbing when you want/need to zone out (which I preferably do in fullscreen code) it interrupts me. Yup, single monitor.

    Bummer :/

    Hopefully it's way up high in that list :p

    You're very welcome! Don't get me wrong, it'll definitely come in handy and I really appreciate your work on the plugin.I just think think there's still more left to do than I anticipated. But I can see that it'll get there. And when the day comes, that SI3 will become my default Editor, I'll definitely let you know. ;)
     
    Flipbookee likes this.
  36. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @noxoc, I see. Thanks for the video!

    There are no many options for me left to "fix" that. Si3 tells Unity to open a new popup and gets the control back immediately. Everything works as if the popup window would be visible, except that it isn't... One thing I could try is to draw the content of that popup window in the code editor window, which will give an impression that it shows up immediately whenever the popup window is fully within the bounds of the code editor. Everything that falls outside of that will still be showing up with a delay... I don't know, that may even look worse than it is now. :confused:

    Another thing which I have already tried and it didn't work well is to keep that popup window always open and instead of closing it and opening a new one to always reuse one. I'd have to resize it and move it in order to simulate hiding, but as I said that didn't work nicely. The smallest size allowed is 1x1 pixel and in some cases Unity is not allowing the popups to stay outside of the visible desktop area.

    One last thing worth trying would be to create the window in advance and only show it when it's needed, if that's somehow possible. I'll try that!

    Well, as I said it takes a little bit until you understand that it's a much better option. There are a couple of features that are unique to Si3 only and MD doesn't have them. Like for example call stack navigation from log entries, auto-generated magic methods, word-wrap, direct help links for Unity and .Net symbols, auto-save and compile on entering play mode in Editor, replace in files with global undo and redo, opening MonoBehaviour scripts from GameObject's, live inspection of field and property values... Those are the main ones but not all! There are more, but smaller ones as well ;)
     
  37. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    Hey,
    Today I have been playing around with script inspector. Love that asset!

    But:
    If I am writting foreach and press tab button, it inserts the snippet.
    Is there a possibility to change the name of the foreach-variable and the name of the collection before going into the foreach with the cursor?
    (Know that feature from Visual Studio, if you want to take a look.)

    And I tend to delete my unused lines of code with Strg+X. But as of now it is not possible to delete the current line by pressing Strg+X, if no code is selected. (Also know that behavior from Visual Studio)

    If I press the ';' inside e.g.
    collection.Add( °here is the cursor° )
    Then it would be great if the semicolon is added after the closing bracket and my cursor goes to the end of the line, or maybe directly to the next line. (Also know that behavior from Visual Studio)

    Do you think it's possible to change that?

    PS: Debugging I think is the feature that I'll be missing most if I switch to Script Inspector completely.
     
    Last edited: Feb 3, 2016
    Flipbookee likes this.
  38. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey @john05, thanks man! :)

    Yes, I know what you mean. This is on my TODO list, it will be added soon...

    That overwrites your copy buffer, but if you don't mind then yes, you can do the same in Si3. You'll have to enable Si3 option "Copy/Cut full line if no selection" in Preferences -> Script Inspector -> Editor for that to work, like this:
    upload_2016-2-3_21-23-21.png

    Otherwise you can also delete a line in Si3 without selecting it with Shift+Delete. This will also preserve your copy buffer.

    Yup! Right after that option (Copy/Cut...) there's another option called "Smart semicolon placement" - just turn it on :cool:
     
    johanneskopf likes this.
  39. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    @Flipbookee Wow, thanks for the fast and helpful answer!
    I am looking forward to the new features. :)
    Do you have a roadmap somewhere? :cool:
     
    Last edited: Feb 3, 2016
    Flipbookee likes this.
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @john05, I was going to put the roadmap on Trello, but I haven't done that yet ;)
     
    johanneskopf likes this.
  41. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    There is something else I want to know.
    F12 is go to definition.
    Is it possible to have the more intuitional behavior of pressing STRG and clicking on a class(name)/field to trigger that action?
    Saw that feature on Visual Studio Code, and I think it would fit here very well. Because it's not that fast to navigate between files in Unity Editor, I use go to definition very often. But that's my opintion.
    What do you think?

    PS: I can use your STRG+D overwrite you posted earlier, but maybe you have something like that already implemented and I have overlooked it again? :D
     
    Flipbookee likes this.
  42. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @john05, ah yes, I promised some time ago to make Ctrl+click do a Go To Definition, but I forgot about that! :p Thanks for reminding me, I'll add that... Ctrl+click is "select word" currently, but I don't think anyone is using that since double-click does that as well.

    Navigating between files in Si3 is fast (or it should be if you know how ;)). Other than Go To Definition there are a number of options for that:
    - Press Alt+Shift+O and search for any file :D
    - Press Shift+Ctrl+O to open a script starting from the same folder as the current script or the last used script.
    - Press and hold Ctrl and press Tab to open the tab switcher. Then use the arrow keys to select one of the open tabs and release the Ctrl key.
    - Press Ctrl+PageUp/PageDown to navigate to Si3 tabs to the left or right of the current one.
    - Press Alt+Left/Right arrows to navigate through cursor history even across file boundaries. Did you just close a Si3 tab and want to reopen it? If another Si3 tab has the focus then the easiest way to reopen it is to press Alt+Left :cool:
    - Want to open MonoBehaviour scripts attached to a GameObject? Just drag-drop the GameObject to one of the existing Si3 tabs ;)

    And all that is available besides the standard ways of double-clicking a script in the Project view or an entry in Find Results windows, or by right-clicking a log entry in the SI Console to navigate to its call stack :cool:
     
    johanneskopf likes this.
  43. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    Oh sorry, wrote STRG, but you understood it anyway. ;)

    That would be a game changer for me, would be more than great if you can implement it this way! ;)
    And you're right, Ctrl to select whole words is not needed that often. It's fast, but double click is nearly as fast, that's good enough :)

    I hate using keys like page up/down, because they are so far away from the letters and not that easy to find. Ctrl+Alt+Left/Right for switching tabs is more convenient to me, and great that you have implemented that too. :D
    Ctrl+Tab is great too!
    Alt+Shift+O is a nice addtion!! Would be great if the first entry is selected as default. (or better the entry that starts with the typed letters - currently that list is sorted alphabetically (that's great), and if i type ship and there are the class e.g. "ship" and "geniousship", it would be cool if ship is selected, because it matches the word "ship" better than geniousship. Therefore I type the class name and press enter to open it instantly. Maybe an option to auto open a class if it is the last entry that's available in the searchbox)
    I never want to search for a script only to select "none", this would make it nearly twice as fast. ;)

    Wooowww :eek:
    Alt+Left/Right and call-stack (tough already known since yesterday :p) is a beast, great!! :cool:
    Also the drag-drop for GameObjects is such a big time-saver, oh my god, love it!! That would be something I would have overlooked, tanks for mention it! :)
     
    Flipbookee likes this.
  44. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hehe, I used to live in Germany for a couple of years ;)

    Yes, I know searching for files on Alt+Shift+O could be nicer and you are totally right! But that window is not something I made or have much control over it. That's Unity's built-in object picker and took me like half an hour to use it. The whole code that "runs" the window is in "Si3 Open Any File.cs". Take a look, you'll be surprised how little bit of code is in it, only 60 lines of C# code or so ;)

    Reimplementing that whole window is not something I plan to do as there are other more important features I'd prefer to focus on, at least for now. :rolleyes:

    I really like when you people like so much what I've done! :D It gives a whole new meaning to what I do and skyrockets my motivation to surprise you with something even better than that :cool: (Have you seen the Magic Methods? ;))
     
    johanneskopf likes this.
  45. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    A quick progress update...

    Some of you have noticed how Si3 in some cases was failing to understand what is the return type of for some user defined C# operators, which was a result of a largish hack in its semantic analysis code :p hehe, but it's time to change that now! This is because Find All References depends on results of the semantic analysis and also the upcoming refactoring and static code analysis features depend on fully correct semantic analysis, so I had no other choice anymore than to replace the hack with a proper solution :rolleyes:

    Now Si3 takes into account all the rules defined in the C# language specification, taking into account operators defined in your own code and in precompiled assemblies, and all the predefined operators for C#. :D This will greatly improve the result of semantic analysis which is necessary to keep your code safe and free of errors after refactoring operations :cool:
     
  46. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Quick question: Where are the docs or instruction manual. I have purchased and imported the package and all I can find is a readme file of update history.
     
    Flipbookee likes this.
  47. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Hey @wood333, the readme file starts with update history but then it continues with description and keyboard shortcuts. I'll move the update history in a separate file to avoid confusion ;)

    If there's anything in particular you'd like to know please feel free to ask here. :) I've tried to make Si3 as intuitive as possible, so things should work as expected without need to read the instructions.

    Checking the keyboard shortcuts cheat sheet might also be a much easier way to find out what Si3 can do.
     
  48. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    Hi Flipbookee,
    I noticed what I think is a small bug today. If I use Ctrl-Tab to bring up list of open windows to navigate and it always shows FGTextInspector.cs as one of the files, even though it is not open. If I select FGTextInspector.cs, it will open the file in its own SI3 window (i.e. no other tabs showing), but even if I close that one, it still shows in the list next time I use Ctrl-Tab.

    Small issue, but thought I should bring it to your attention.

    Thanks,
    FM
     
    Flipbookee likes this.
  49. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Good idea moving the description up, because the Unity inspector window only shows to upper portion of the script. Of course if I click on the read me script, Mono opens and I can read it all.

    Problem - There is no option in the Window menu to open the Script Inspector Console. There is no visible evidence that SI3 is installed, short of the contents of the PlugIn folder.

    There may be a battle taking place for dominance between Mono and SI3, with Mono winning this morning. SI3 did work some last night.
     
    Flipbookee likes this.
  50. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    @FireMutant, interesting... I have really no idea how can that happen :confused: I'll have to check the code... Thanks for the report!