Search Unity

Script Inspector 3

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

  1. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    What I mean is I don't want to disable Antares Universe's function to TextAsset. Is there a way for Antares Universe to co-exist with Script Inspector 3?
     
  2. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Yes, I see... Let me check that once again. I'm not sure what was that used for in Antares Universe, so maybe it isn't needed or maybe there's a way to detect when it's needed and adjust the behavior of Si3 to pass the control to AU.
     
  3. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    506
    I got text disappear after typing this
    Code (CSharp):
    1. if (_viewScale
    It will reappear / blink when I type until the code is valid to parse. Can you have a look ?
     
  4. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Hmm, I can't repro this... That must depend on context in which you're typing that. Can you send me the script and the related files too? Did you notice anything in the console? I can't imagine why the text would disappear unless the parser has crashed, but then you'll get some crash info in the log.
     
  5. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Hey @I am da bawss I checked this. Seems like Antares Universe is using Unity's TextAsset for storing their graphs, so that their custom editor has to be associated with TextAsset class, same as the Script Inspector does that to handle showing and editing text files in the Inspector view. Unity doesn't provide any mechanism for multiple custom inspectors for a single asset type to coexist, so I don't know if we can solve this anyhow. I'll have to investigate a bit more to find a solution...

    I'd dare to blame Antares Universe for the lame solution since the plugin overrides Unity's built-in inspector for text files. Without the plugin Unity shows the content of text files! Not as nice as the Script Inspector, so longer text files get truncated at some point, there's no way to select and copy text, and of course no support for editing, but still it's better than the empty inspector you're getting with Antares installed. I guess the the decision to use TextAsset's wasn't the most optimal one, but it's certainly the easiest one since Unity allows easy read functionality for such assets.

    Note that even with Antares Universe installed you can still open your text files in new SI tabs and view or edit them there! Or you can still do that change in Antares to disable their custom inspector so you can then use SI's custom inspector. This will not break Antares as far I can see, just you'll have no access to that additional info you get when an Antares graph is selected.
     
  6. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    I see, thanks for the explanation. I guess I just have to work around it by disabling/commenting out their script when I want to use SI3, and re-enabling it when I want to use Antares Universe. Thanks anyway!
     
  7. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    My most favorite tweet:



    It's <here> if you agree and want to add it to your favorites or re-tweet it ;)

    Thanks Nick! :D
     

    Attached Files:

    Novack and shkar-noori like this.
  8. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    103
    shkar-noori and Flipbookee like this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Thanks for your great feedback! :cool:

    I've tried the game and the gameplay is awesome!!! Guys, if you have some work to do, be warned, don't install this game! It's too addictive! :D Thanks for sharing it here :) it's great too see things like this. I'm thinking now is #madewithsi3monday going to sound good? :p
     
    The-Oddler and shkar-noori like this.
  10. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Si3 Beta 3 got just released to the Si3 beta group :D and I'm eagerly looking forward to receiving feedback!
     
  11. Drannach

    Drannach

    Joined:
    Apr 6, 2014
    Posts:
    22
    Ok i just started to use SI3 b3, so i cant say much about bugs and so on, but i want to tell everyone is not using it YET that it is an AMAZING tool.
    I'm not planning to use visual studio anymore actually...
     
    Flipbookee likes this.
  12. LoTekK

    LoTekK

    Joined:
    Jul 19, 2010
    Posts:
    136
    So I'd stopped using this for a while at my day job because saving instantly triggered a compile (which was quite egregious with our project... lots of scripts, dlls, csv conversions, etc), but the new behaviour makes a huge difference, so thanks a ton for that!

    I've hit what appears to be a bug with, specifically:
    Code (csharp):
    1. Resources.LoadAll<T>(string path);
    If I open or edit a script that has that line in it, I'm pretty much constantly spammed with the following:
    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. ScriptInspector.ReflectedTypeReference.get_definition () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:573)
    4. ScriptInspector.MethodDefinition.ReturnType () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:3217)
    5. ScriptInspector.SymbolDefinition.ResolveNode (ScriptInspector.BaseNode baseNode, ScriptInspector.Scope scope, ScriptInspector.SymbolDefinition asMemberOf, Int32 numTypeArguments) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:5740)
    6. ScriptInspector.SymbolDefinition.ResolveNode (ScriptInspector.BaseNode baseNode, ScriptInspector.Scope scope, ScriptInspector.SymbolDefinition asMemberOf, Int32 numTypeArguments) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:5647)
    7. ScriptInspector.SymbolDefinition.ResolveNode (ScriptInspector.BaseNode baseNode, ScriptInspector.Scope scope, ScriptInspector.SymbolDefinition asMemberOf, Int32 numTypeArguments) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:5561)
    8. ScriptInspector.SymbolDefinition.ResolveNode (ScriptInspector.BaseNode baseNode, ScriptInspector.Scope scope, ScriptInspector.SymbolDefinition asMemberOf, Int32 numTypeArguments) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:5877)
    9. ScriptInspector.FGResolver.ResolveNode (ScriptInspector.Node node) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:7668)
    10. UnityEngine.Debug:LogException(Exception)
    11. ScriptInspector.FGResolver:ResolveNode(Node) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:7674)
    12. ScriptInspector.FGTextEditor:DoGUI(Boolean) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2707)
    13. ScriptInspector.FGTextEditor:DoGUIWithAutocomplete(Boolean) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:1557)
    14. ScriptInspector.FGTextEditor:OnInspectorGUI(Boolean, RectOffset, EditorWindow) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:1511)
    15. ScriptInspector.ScriptInspector:DoGUI() (at Assets/Plugins/Editor/ScriptInspector3/Scripts/ScriptInspector.cs:207)
    16. ScriptInspector.ScriptInspector:OnInspectorGUI() (at Assets/Plugins/Editor/ScriptInspector3/Scripts/ScriptInspector.cs:201)
    17. UnityEditor.DockArea:OnGUI()
    18.  
    I should note that the errors first manifest the instant I open the first parenthesis:
    Code (csharp):
    1. Resources.LoadAll<Sprite>(
    And this does not happen with, for example, Resources.Load<T>(string path)

    [in case it's not clear, the code compiles and runs fine, it's just the constant spam while editing the script]
     
    Last edited: Dec 15, 2014
  13. LoTekK

    LoTekK

    Joined:
    Jul 19, 2010
    Posts:
    136
    Oh, one little occasional annoyance is that SI doesn't appear to handle class overloads. So I don't get any intellisense when overriding a base method, nor when, for example, I try and access the base class method:
    Code (csharp):
    1. base.Initialise()
    Unrelated to the above, but is there a chance you'll be able to offer optional auto bracket enclosure?
     
  14. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    506
    Current beta version does not completely support generics yet, so this errors pop out frequently if you use generics in your code. I'm pretty sure that it's the next-big-thing he is working on right now ... :)
     
    LoTekK likes this.
  15. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    506
    I also got this warning in Unity4.6.1 x64 Windows 8.1 x64

     
  16. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Thanks @Drannach! You're my hero :D

    Great to hear that! Thanks for the feedback :)

    Yes @LoTekK, I know about this one, and as @thienhaflash explained I'm working on it. Generics turned out to be the most complex thing in syntax analysis of C# language... I've managed to do that for generic types, but it was a hell lot of work! I have to do the same for generic methods, and most of that is done but not yet finished.

    This is interesting! Can you share some more details? Maybe PM me that script or a smaller example?

    Yes, it's on my TODO list ;)

    I've seen that one, thanks, I'll fix it!
     
    Drannach and LoTekK like this.
  17. LoTekK

    LoTekK

    Joined:
    Jul 19, 2010
    Posts:
    136
    Thanks for the clarification on generics! I'll keep my fingers crossed for that. :)
    Which probably also relates to my second question about subclassing. The above example (base.Initialise()) was a subclass of a Generic class (basically a Singleton<T> pattern), so that would probably explain the lack of intellisense for that case. Subclassing non-generic classes seems to work fine!
     
  18. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    You may have discovered a bug then! Singleton<T> is a generic type, so it should work and T should get substituted with a concrete type when base is used in the derived class. I'll check this, maybe something is missing in handling generic base classes... o_O
     
  19. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    @LoTekK it turned out you did discover a bug actually! Thanks so much!!! :D I'm fixing that with a couple of other related issues right now, preparing all that for Beta 4. Fixing that is not that hard as it is the testing process to verify that resolver and auto-completion work correctly in various scenarios... So I'll count again on your help guys with that ;) - stay tuned!
     
    Drannach likes this.
  20. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Loving the Beta so far. I have a few questions:

    1. I would like to propose to move themes out of the main file, if that's not already the plan.
    2. I'm on a Mac and a couple of the keybindings are off. When navigating text, jumping to the next word is done with alt+arrow keys, not cmd+arrow keys. So line 4869 in FGTextEditor.cs should be:
    Code (csharp):
    1. bool actionKey = isOSX ? current.alt : current.control;
    3. Cmd+arrows should work like HOME and END, so jump to the beginning and end of the line.

    Thanks!

    Edit: The keyboard shortcuts are difficult to edit as it stands now; there's also no menu for SI3, so I can't make my own keyboard shortcuts that trigger an ExecuteMenuItem to override the ones in SI3. But my change above will ruin the "Comment/Uncomment Selection" and "Undo/Redo" key bindings, unfortunately. I would reorganise the keybindings in the code per key, not grouped per modifier key as it is now; that makes it difficult to make changes to the modifiers of one keybinding without changing them for all other keys. Thanks!
     
    Last edited: Jan 1, 2015
    Flipbookee likes this.
  21. Callski

    Callski

    Joined:
    Feb 3, 2013
    Posts:
    130
    Dude this is ridiculously awesome! I can't believe how cool this is! Thanks so much! There is one minor thing I'm noticing but it's not a big deal. If you use this.GetComponent<TestClass>().MethodName(); The script inspector won't recognize the method you are calling and gives you "unknown symbol". Code will compile and run just fine however. It's probably more trouble then its worth to fix. I doubt many people even use this to call functions on other scripts.
     
    Flipbookee likes this.
  22. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    :D

    Yeah, I'm still working on generic methods, it's almost done and then it will come in Beta 4 :)

    :D

    Sure, moving themes in separate files makes sense, will do so! Keyboard handling code is a bit messy :p and yeah, not exactly matching Mac's standard cursor movement shortcuts, so I'll have to fix that too... Thanks for your feedback! :D
     
  23. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Flipbookee, I just had to say how awesome a job you are doing! Keep it up!

    I don’t know how much repeated cookie cutter sentiments like that do, but to give you an idea: I picked up Unity as a hobbyist somewhere around v2.6, learned a ton, *loved it*, built a few things (one on the Asset Store), and really wanted to continue with it... but after I picked up Xcode a few years latter... I simply couldn’t use Unity anymore... I was spoiled… Between OnGUI (complete lack of an integrated graphic UI designer) and more importantly no integrated IDE, or even an external Mac based IDE that even reaches to be *half* of what Xcode is... Unity was just too painful for me as a coder! To Xcode, I can 'speak' multi thousand line programs, to Unity, as far as coding goes, it’s like ripping teeth by comparison.

    Script Inspector is bringing me back! (ok, and the new UI system) But seriously, I SERIOUSLY hope that UT is taking note of what your doing! While I can understand Unity’s goal not being rooted in content creation, like 3d Models. An integrated coding environment is just absolutely paramount! With how much the languages used in Unity are so elegantly tied together with Unity’s framework, and how utterly painful an external IDE can be, We need what your doing!!!... I don’t want to hijack your thread with philosophy here, but even if UT won’t create a integrated IDE soon, or ever, I sincerely hope they can continue to make it easier for you, and alike, to integrate things such as Script Inspector, and work with you (or hire you) toward that end! (Ex. Foreground tab / moused over tab specific keyboard shortcuts & undo history especially! UT, cough cough, hint hint! ;) )

    Any way, Let me know if you still need any more Beta testers. I’d be happy to help. I’m going to have almost a whole week free each month while traveling for the next 4 months or so (plus normal weekend + after work free time)… The project I’m slowly plucking away at is developing a lot of sub classing of generics, so I have a plenty I could test it on as I go!… I have SI2, but I'd so love to kiss Mono-Develop goodbye entirely for that (only thing I still use the *** for is code completion, k, bp's too, but still, MD makes me cry when coming from Xcode)!





    Two small feature requests, and an idea, and I’ll go:
    1. When you have Auto-complete suggestions where your happy with it, make sure the list displayed is well exposed in code before drawn… I can’t tell you how often with every IDE I’ve used I’ve wanted to just *explain* to the computer, DON’T GIVE ME THAT! and I would ****LOVE**** to work with you on smarter list ordering, or to make an extension for it if you haven't done something similar already. Either by some form of suggestion favoring system (thumbs up/down sort of speak), or something more automatic that just lists top to bottom based on most used within a given context.

    2. When you go for code folding — Stay on Auto Complete for now, 1 thing at a time, totally with ya there — but when/if you do… Go for it Xcode style, not just disclosure triangles (see here)… SO MUCH easier to see with nested code!… It’s not perfect with lots of nesting, but it’s a pretty good visual… Even kinda helps with the color theme concerns a bit, because you can focus on a method and make it a bit easier on the eyes while you read through it, just by mousing over the folding ribbon ribbon next to it (should prove fairly simple with what you have already).

    Idea: For debugging (breakpoints and such) in the editor (un-built project running in Unity). I read your post about not being able to freeze Unity with SI running in it… Pretty interesting problem I have to say, and I *kind-of* wonder if it isn’t at least *one* of the reasons why UT didn’t make their own integrated IDE in the first place (would kinda break the dock-able tabbed theme anyway)… But I was thinking, since you’d need a second process to attach to Unity and block it for debug anyway... That second process could easily be used to display a simple inspector style window with what it finds at each break point, and continue Unity when told to do so... Ok, so getting the 'what to display part' is more complicated, only just starting to read about it my self (great linux rooted article on it here btw), but once you have it, I would think Unity being blocked would be a somewhat minute problem… Yeah, you won’t be able to code with SI while it’s blocked, but any memory info or stack traces you wish to observe could be easily displayed with the second process, possibly even with a Unity written app. Then once the user continued (via the second process) SI would function until the next break point and could update it’s UI accordingly… Anyway, Just a thought… I’d be happy to help with any Mac side UI design or coding for such a debug process if a Unity made application couldn’t be made to attach to Unity. I have a little bit of experience with inter-process communication, course that's all rooted in Obj-C (would be interesting though)...

    Anyway, Keep up the great work! ;)

    Sorry, for the WOT!… I’m too good at that... I've sought help, but they've all given up... :(
     
    Flipbookee likes this.
  24. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    @inventor2010 Thanks for your WOT, I love it!!! :D Knowing people care so much about what I'm doing is exactly what I need, because that's the only thing that keeps me motivated! :)

    I was planning Beta 4 to be the last closed beta release before Si3 goes on Asset Store, but it isn't easy to find people who are working with lots of generics based code, so your help will be more than welcome!!! I'll send you a copy in a few minutes... :cool:

    All the code is still open. Si3 comes in full source code format... But I doubt you'd like to change anything in how auto-complete suggestions are picked - you'll be surprised how good it is even now ;) but I'd still love to hear suggestions for improvements if you come up with anything!

    Thanks for Xcode's code-folding link. My vision was pretty similar and inspired by IntelliJ's IDEA, but I didn't know Xcode is doing better job with that than Visual Studio.

    I'm so glad finally someone commented on my crazy idea to use SI for debugging :) - I was wondering how long will it take until someone realizes how mind-bending is that! :D So, here's a little hint if you wanna think a little bit deeper: Modal windows... Unity can display a modal window which block the execution of everything else until it gets closed. This is not going to "pause" your game running in editor between two frames as with the pause button, but it also "pauses" execution of the scripts! :) ... Unity is a great engine with lots of potential, all just waiting for us to unleash its superpowers :cool:
     
  25. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Np, here's another! :p

    Ok, so I've been playing with the beta... Amazing!... I'm going to have to dig deep and use it for a while. I can't wait till next week, I'll be using SI3 the whole time! :)

    I may be taking back the thing I said about smarter suggestion ordering too, I haven't used it long obviously, but SI actually remembers the last suggestion I chose, and uses that even after a Unity re-launch, Not Bad! I think you've already beat Mono develop a few times over, bugs left or not!

    I did catch a few minor things below, but certainly nothing that's a deal breaker...

    The bulk of this is just detailing 2 main larger improvements I'd like to see in autocomplete, not so much bugs... But honestly, while I'm going to be critical now, SI is still pushing MonoDevelop out of the way in my mind, and it's already about 10x anything else I've seen for a Mac+Unity IDE!

    I'll have to think more about the Modal Windows thing though... Certainly an interesting idea! You could block it anywhere and dig right into public memory... Problem is I'm not sure how you would look at private variables. Course my C# and Unity inter-working's knowledge isn't *that* strong atm, but I would think you'd have trouble observing any private code from within unity it self in C#. Not to mention the launching of a model window in the first place... I mean, it's a pretty good way to freeze the program sure, but you'll basically have to inject a hidden call to open your model window at the location in the user's script that they want a break-point, and then your going to have double referencing (you observing them, and them calling you), compilation order issues, etc:eek:... Course those things alone don't mean it's impossible, but they're *usually* really bad signs! Could get pretty hairy!







    Bugs:
    1. in defining a class that inherits from object, ‘object’ is being underlined as incorrect when it's not. (noticed specifically with a “public abstract class” definition)
    2. (Not sure if this is a bug or not) attribute names are being suggested without being prefaced by a ‘[’.

    Minor stuff:
    1: Highlighting of names doesn’t go away when the cursor is placed on some other thing that is not a name (such as white space).

    Very Minor stuff:
    1: DIF initial and final file before save prompt, if nothing changed, don’t prompt
    2: On Find: Maintain focus on find field so enter can continually move to the next occurrence


    Major auto-complete suggestions / feature requests
    1. Autocomplete for overriding inherited functions. — Maybe you have an explanation for why this is harder than I’d think, but MonoDevelop has this problem too, and it drives me NUTS! None of the events (eg: Update, LateUpdate, OnGUI, Start, etc) are suggested. Maybe I’m a bit spoiled here too, but in Xcode (sorry, I love Xcode, not that I wouldn’t reprogram like 50 things in it if I could, but it really is a pretty good IDE) while typing the Obj-C version of public, private, or the return type of a method does very little with autocomplete, all you actually need type is the beginning of the method name of any inherited or declared method and it automatically fills in not only the method name it self, but also the return type, public/private before the method name, and it's parameters. I would think that by typing “void U”, or “U” in a class definition with MonoBehavior as it’s parent, “Update” would be suggested but it’s not… Not sure what this would take with C# and the autocomplete algorithm you have, but it could be a real time saver!
    2. Autocomplete of all forms of a method including it’s parameters, and return type. — I’m not as familiar with signatures in C#, so not sure if this is possible (not sure if they include parameters, or specifically parameter names), but if you have a function that takes 3 parameters “func(float a,b,c)”, don’t just suggest “func” (again stealing from Xcode here), but a “simple” way to handle that is to suggest something like: “func(<#float a#>, <#float b#>, <#float c#>);”, Xcode then handles this by hiding the <##> and displaying what it encloses as a single text bubble that behaves much like a single character, but: is typed over by default, can be converted to normal text by clicking enter, and each bubble can be tabbed/shift+tabbed between…… So for example, say I’m calling ‘func’ on ‘instance’: I type ‘i’, I get an auto complete for ‘instance’, type ‘.’, a list of functions comes up, I hit ‘f’ to narrow it, the above suggestion comes up, I select it and hit enter, I get 3 bubbles “float a…b…c” where a is already selected, I type my name for parameter a, it autocompletes, I hit tab to move on to b (no enter key, tab is double purpose in this instance, both taking the selected autocomplete suggestion, and taking me to the next bubble, esc would be used first if the suggestion was wrong and I wanted what I typed), and then repeat with b and c…. This is basically absolutely PARAMOUNT with Obj-C because you can literally have a method name that looks like a paragraph, in-fact, it’s actually almost encouraged because it’s what makes the language so self commenting! And this form of autocomplete, *basically* lets you punch through it in about… well, for the calling ‘func’ on ‘instance’ example, I count a total of about 5 keystrokes to get the outline of func, and then depending of course how many parameters you may have with the same first letter in scope that you’d have to sift through in autocomplete, as little as 2 key stokes per parameter and one final enter! And thats without any need to type commas, spaces, open / closing parenthesis, or return types or scope (if you were overriding a inherited method). That all adds up quick if you have a lot of parameters and a long method name to describe it! AND, the names of the parameters are right in-front of you as you type over them, so you know what to put where without going back and forth or using 2 windows. FYI, this schema also works amazingly well with common things like entire for loops, or even custom code snippets. VERY POWERFUL!
    3. Forward back navigation between previously opened files in SI menu

    One other little misc feature I just noticed I missed was Find and Replace... not sure how that works in SI if it is there, but it'd be really easy to add if it isn't. Better yet, RegX Find & Replace... not something you use every day, but again, powerful stuff, and not too hard!
     
  26. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    506
    Because those functions are Unity's magic secrect, there are no inheritance here ...
     
  27. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Ok. Had to research it a little (I subscribe not to magic :)), but that makes sense.

    So, I guess it would just be feature requests...
    1. Autocomplete of a list of events Unity checks for (update, start, etc)... They'd just have to be stored in a list if you can't find them by inheritance.
    2. Autocomplete of function name of an inherited function once the return type is already typed. It works when the return type isn't typed but not when it is. Also would be nice to get the return type to autocomplete with the function name.
    3. Autocomplete of function parameters, preferably with their names and means to tab between them.

    Again, not sure if the last 2 are a limitations of how C# signatures work, or to the extent which they can be retrieved. After all, Mono-develop doesn't even do it, and that's my only *cough* "decent" *cough* example in C#. If it is possible though... would be VERY nice!
     
  28. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    @inventor2010: Yes, the idea with modal windows sounds complicated but I don't get scared or give up easily ;)... Anyway, if that doesn't work there are alternatives, and running another process is one of those, also the most promising one so far. Reading private data through reflection is really trivial, but reading local variables data is not possible using reflection. Luckily there are alternatives for that as well.

    Congrats! You've found a bug :p and I've fixed it already. It was an easy fix... Thanks!

    No, attribute names are valid outside of [ ] so completion must offer them. The only difference is that short attribute names are only valid inside [ ].

    This is intentional and it works similar (even a bit better IMO) as in Visual Assist X extension for Visual Studio. But I'll make this optional so people can disable the feature if they want.

    That's i nice suggestion, I think :)

    Yes, I agree that might be better than what it does now... So yeah, I'll do that too :)

    Yes, I've planned to do that! Completion will offer auto-implement for method overrides after inserting a space after override keyword. I've also planned to add automatic insert for magic Unity methods because I can't remember all of them and often I mistype the signature and then I wonder why it doesn't work :p

    I'll check how that works in Xcode, it sounds interesting! I was planning to add parameter hints instead, so I'll see which of these two makes more sense...

    Yes, Find&Replace is still missing. It's easy to add that.

    Thanks for all your great feedback! :D
     
  29. Callski

    Callski

    Joined:
    Feb 3, 2013
    Posts:
    130
    I know I've been saying this, but I still can't get over how cool this is. I'd pay $125 or more for this asset. Unity should hire you to integrate this by default into their engine. I hope this gets their attention like NGUI did!
     
    Flipbookee likes this.
  30. radimoto

    radimoto

    Joined:
    Aug 23, 2012
    Posts:
    257
    Hi there, is it still possible to join the pre-beta ? Cheers
     
  31. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Sure, I'll only need your email. Thanks! :D

    Thank you so much for this amazing post!!! :D
     
  32. Callski

    Callski

    Joined:
    Feb 3, 2013
    Posts:
    130
    After you're done with C# code completion do you plan on trying to get javascript doing the same thing?
     
  33. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    @Callski Yes, yes, that's the plan. It would be a pity to abandon such power and not use it for other languages as well! All the hard word has already been done - a fast parser with support for pluggable grammars and incremental parsing, a resolver and completion engine for .Net code, editor UI for Unity's immediate mode GUI, etc... All it takes is to transform UnityScript grammar to Si3 format and then adjust semantic analysis here and there for UnityScript specific code structure. Once grammar is translated Si3 will automatically become capable of detecting syntax errors and will offer completions for valid keywords at any given context :cool:
     
  34. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    506
    Sounds absolutely cool ! :)

    I don't use javascript at all so I'm all for shader syntax completion first but there are many many more people out there use javascript compared to number of people can modify a shader script, so go for javascript first man :)
     
    Last edited: Jan 13, 2015
  35. poppgames

    poppgames

    Joined:
    Jan 18, 2015
    Posts:
    11
    Hello Fipbookee,

    I was wondering if I could be a Beta-Tester for Script Inspector 3. I must admit that I do not have much knowledge of Unity (about 3 months), but I know C#. It would a valuable real world learning experience which I know I can handle. That and provide quality feedback. Thank you

    - Poppgames
     
  36. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
  37. poppgames

    poppgames

    Joined:
    Jan 18, 2015
    Posts:
    11
    Thanks, I loaded Unity up. (First impressions)
    First of all, I had no major problems. IntelliSense works very smoothly as I imaged it would.
    The popup box had a problem showing up when attempting to call a static function.
    Ex:
    Code (CSharp):
    1. Vector2 v;
    2. v = Vector2. (pop-up box does not appear here, intending to call a static function)
    Before finding this, I bought uIntelleSence, which inspired me. I was able to add extra information to the Vector2 UnitySymbols file. Although this might require an unnecessary amount of time, it might be possible as a way-in-the-future update.
     
  38. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    @poppgames WOW man! That's an amazing discovery!!! There was a tiny bug in the completion list auto-popup algorithm that was always ignoring a dot typed in right after a digit, ignoring the fact that the digit might be part of a valid identifier, such as in this case and also for Vector3, Vector4, Color32 and similar identifiers ending with numbers. I'm fixing this now so it will come in Beta 4 very soon. :cool:

    It's amazing how no one noticed that so far! Thanks a lot! I'm so glad you joined the beta now :D
     
  39. poppgames

    poppgames

    Joined:
    Jan 18, 2015
    Posts:
    11
    Thanks. Do not forget Matrix4x4
     
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    He he, sure, I fixed it for all cases and for any identifier ;)
     
  41. poppgames

    poppgames

    Joined:
    Jan 18, 2015
    Posts:
    11
    I happened to have some more free time today. This is not a bug, but a missing feature which I find in all other IDE's. I looked through the forum and nobody has mentioned it yet.
    The triple /// for summary, param, and returns. This will most likely be very challenging because it would require you to parse every single function, variable, and identifier. Then you would sort them into a hash-table or trie for fast access.

    Example code
    Code (CSharp):
    1. ///<summary>
    2. ///Tests a class description
    3. ///</summary>
    4. public class PrivateTest
    5. {
    6.     ///<summary>
    7.     ///A public variable
    8.     ///</summary>
    9.     public int publicVar;
    10.     private int privateVar;
    11.  
    12.     PrivateTest()
    13.     {
    14.         publicVar = 0;
    15.         privateVar = 3;
    16.     }
    17.  
    18.     /// <summary>
    19.     /// Constructor of this class
    20.     /// </summary>
    21.     PrivateTest(int publicVar, int privateVar)
    22.     {
    23.         this.publicVar = publicVar;
    24.         this.privateVar = privateVar;
    25.     }
    26. }
    Will we be able to assign shortcuts in the Script Inspector?
    I like using Ctrl+Y for redo, instead of Ctrl+Shift+Z.
     
  42. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Yeah, I know that's missing and yeah, it isn't easy, but definitely doable. I'd have to parse every single script to collect all the comments and one of the very unique features (and also a clever trick) in Si3 is that it doesn't parse all the scripts but only the modified ones, those which haven't been compiled yet. That's one of the reasons why it runs so fast! It's been designed since the beginning to use a hybrid code analysis technique, one half based on Reflection and the other half based on actually parsing the source code and analysis... So you see, reading all the comments would make this feature useless... unless... Oh, I just got an idea, he he! :D ... Well, unless I let the compiler generate XML docs and read that instead of parsing every single file, kind of similar as when I use the Reflection to avoid parsing everything!!! :cool:

    Shortcuts customization is on my list too and I think it's also a 'must have' feature. The thing is I'd only be able to do that on Windows for now, so this should be postponed until I find out how to override any shortcut on OS X as well... Until then I think I'll just add Ctrl+Y on Windows as an alternative shortcut for Redo.
     
  43. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    What do you mean? Isn't it as simple as defining a Script Inspector (sub)menu with attached keyboard shortcuts? If @poppgames prefers ctrl-y for redo, it doesn't matter if ctrl-shift-z still works, as it won't be pressed anyway?
     
  44. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Yes, ctrl-Y and ctrl-shift-Z can both work for Redo, that's not an issue. That's what I meant by adding an alternative shortcut.

    Note that Si3 shortcuts are not done by adding menu items since all its shortcuts (well, most of them) are only for Si3 and they don't do anything when the focused window is not an SI view.

    I wanted to say that Si3 on Windows is slightly more advanced because it can handle and process any shortcut, but on OS X some of the built-in Unity shortcuts still cannot be handled. I'll have to do a similar trick as on Windows to be able to catch all the shortcuts, and I think that would be more important for now.
     
  45. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    I don't see why there can't be a Script Inspector submenu in Window. Some of the options would only work with a focused Script Inspector tab, of course.
     
  46. SpectralRook

    SpectralRook

    Joined:
    Feb 9, 2014
    Posts:
    112
    Hi Flipbookee, Could I get the latest SI3 beta? I am currently using Beta 2. Maybe it will fix a problem I'm having with namespaces? I'm noticing issues with "nested" namespaces. Example follows:

    If I use namespace A.B in both files, the reference to ITestable in ITest.cs is unknown. However, If I change the namespace to A in both files, the reference to ITestable is correct.

    ITest.cs :
    Code (CSharp):
    1. using System;
    2. namespace A.B
    3. {
    4.    public interface ITest
    5.    {
    6.      string Code { get; }
    7.      Guid FromTestId { get; set; }
    8.      ITestable AssignedTo { get; set; }
    9.      int StackTest { get; set; }
    10.      string Description { get; }
    11.    }
    12. }
    ITestable.cs :
    Code (CSharp):
    1. using System;
    2. namespace A.B
    3. {
    4.    public interface ITestable
    5.    {
    6.      Guid TestId { get; }
    7.      int ItemCount { get; }
    8.    }
    9. }
     
  47. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Yep, that's possible but not nice because then Unity is not going to allow any of the other editor extension to handle those shortcuts! Unity doesn't send keyboard events of shortcuts which appear in the main menu, not even to the focused editor tab, which is wrong of course but we can't do much about it... Some of the extensions available on Asset Store were causing problems to Si3 with their shortcuts in the main menu.

    Yes, I'll send you the latest but it won't fix that - you've found a valid bug that I didn't know about! Thanks, awesome job! :D (what would I do without you guys)
     
  48. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Then I'd like to request some sort of API to create the menu items myself. :D
     
  49. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    Sure, no problem! :) Do you have some specific examples? Many things already exist.

    Just keep in mind that keyboard customization (if implemented correctly) has to be stored in the EditorPrefs instead of being "hardcoded" as a script that adds items in the main menu. There are at least two reasons for that:
    1. You don't want that customization to be per project or otherwise you'll never know what shortcuts to use in which project;
    2. If there are more people working on the same project each of them may want to map their shortcuts differently.

    But if you're working on a single project with no other programmers then you'll be fine. ;)
     
  50. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,379
    YAY! I just fixed this bug! :D
    Would you like to try it out?