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,793
    @mcmorry Hmm, it worked for me by only importing the package... No idea :confused:

    @UnLogick That's an excellent point! I'll add that :)
     
  2. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    But please, try to limit the feature creep and focus on the find references and rename.
     
    olonge and Flipbookee like this.
  3. schplurg

    schplurg

    Joined:
    Mar 21, 2009
    Posts:
    208
    This happened to me again and I can't remember how I got it working again. I followed the tip in the post below the one quoted above but Si3 doesn't appear in the menus or anywhere even after reinstalling it.

    Losing my layout is a real pain. I guess I can rebuild my layout again, but how do I get Si3 working again?

    ETA:
    I didn't follow the instructions carefully enough. On a Mac something isn't uninstalled until you empty it from the trash. Gawd I hate OSX!!! And for the price I paid for Unity I'm really disappointed with it for many reasons, only one of which is stability (OSX). Really really had it with this program.

    Flipbookee, maybe if you joined their team you could make it better. Sorry for the rant but it's been a long week.
     
    Last edited: Sep 27, 2015
    Flipbookee likes this.
  4. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hey, hey! Good news :)

    Script Inspector 3 - version 3.0.7
    is available now on Asset Store! :cool:
    Changes:
    - Auto-generating override methods
    - New toolbar button: Version Control
    - Massively improved type inference for generic methods and lambda parameters
    - Added option to Find Text in the open tabs only
    - Using only local Unity documentation when internet is not available
    - Bug fixes

    Enjoy! :D
     
    mcmorry likes this.
  5. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hehe :p
     
  6. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hey man, this is a little bit confusing. Is that a typo maybe? Did you uncomment all those lines or did you comment them out? I understood in Unity 5 you had to comment out the return statement and that fixed the problem. Or am I wrong?

    I commented the return statement out and that worked just fine on Windows in both Unity 4 and 5. I've tested it in the Inspector window as well in both and that was also fine, so currently in Si3 3.0.7 it's like that... Is that working fine?
     
  7. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Sorry maybe my english is not the best and I could be using wrong words.
    For me "commented out" and "uncommented" mean the same. They mean to me to remove the comment and to have the code executing.
    Let me know if I intend it wrong.

    So to clarify the code that works for me in Unity 5 is:
    Code (CSharp):
    1.                 case KeyCode.Return:
    2.                 case KeyCode.KeypadEnter:
    3.                     if (isActionKey && EditorWindow.focusedWindow != null)
    4.                     {
    5.                         current.Use();
    6.                         OpenAtCursor();
    7.                         EditorWindow.focusedWindow.SendEvent(EditorGUIUtility.CommandEvent("OpenAtCursor"));
    8.                         GUIUtility.ExitGUI();
    9.                         return;
    10.                     }
    11.                     break;
    12.  
    EDIT: of course commented out is not the same as uncommented. So it was not a typo and I intended correctly.
     
    Flipbookee likes this.
  8. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Ugh! I misunderstood that... Then I guess Cmd-Enter still doesn't work in Unity 5? And I thought I fixed it :p
     
  9. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Bad news for today, I have something like this
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. using System;
    4. using System.Collections;
    5.  
    6. public class SkoolboConfig : ScriptableObject {
    7.    
    8. }
    9.  
    10. public class InheritableT<T> {
    11.     public bool inherit;
    12.     public T value;
    13. }
    14.  
    15. [Seriar]
    16.  
    And here is the error log

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ScriptInspector.ConstructedTypeDefinition.BaseType () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:2443)
    3. ScriptInspector.ConstructedTypeDefinition.DerivesFromRef (ScriptInspector.TypeDefinitionBase& otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:2549)
    4. ScriptInspector.TypeDefinition.DerivesFromRef (ScriptInspector.TypeDefinitionBase& otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:3267)
    5. ScriptInspector.TypeDefinitionBase.DerivesFrom (ScriptInspector.TypeDefinitionBase otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:1905)
    6. ScriptInspector.FGTextEditor.DerivesFromOrContains (ScriptInspector.SymbolDefinition symbol, ScriptInspector.TypeDefinitionBase type) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6560)
    7. ScriptInspector.FGTextEditor.<FilterCompletions>m__50 (ScriptInspector.SymbolDefinition x) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6540)
    8. System.Collections.Generic.HashSet`1[ScriptInspector.SymbolDefinition].RemoveWhere (System.Predicate`1 predicate)
    9. ScriptInspector.FGTextEditor.FilterCompletions (System.Collections.Generic.HashSet`1 data) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6540)
    10. ScriptInspector.FGTextEditor.Autocomplete (Boolean suggestionsOnly) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6503)
    11. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2744)
    12. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2612)
    13. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1061)
    14. 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)
    15.  
     
    Flipbookee likes this.
  10. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
  11. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hey @thienhaflash, what version of Si3 is that? In the latest 3.0.7 line 2443 in FGTypeSystem.cs is:
    Code (csharp):
    1.             if (constructedParent != null)
    Nothing can crash there :p

    I also tried to reproduce this using your code example, nothing happens...

    EDIT: Checking the rest of the call stack I can see this is definitely not the latest Si3. Can you please update and check again? There were a lot of changes in FGTypeSystem.cs, fixes and improvements mostly related to generics, extension methods and lambdas so knowing your coding style the new Si3 will be very beneficial for you! ;)
     
    Last edited: Oct 1, 2015
  12. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Say, i've been out of the loop for a while, and haven't had a chance to use SI3 for some time. Just downloaded the most recent version of the assets store, and it's really nice! Also, congratulations on getting nominated for the unity awards!
     
    mcmorry and Flipbookee like this.
  13. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hey @Adam Buckner, thanks man! And welcome back :)

    There were a lot changes and improvements in Si3 since the last time I saw you around. You may like the new Find in Files (Window/Script Inspector 3/Find Text menu item), the Open File and Open Any File - these all work from anywhere even if there's no Si3 window open! There's also a new Toggle Floating Si3 Tabs function - nice if you're working on a single monitor.

    I don't know if you've seen the values shown in tooltips for static fields and properties, and even for non-static members of Components and ScriptableObjects? That's kind of nice too :) may save you the whole trouble of attaching a debugger to read those values. @UnLogick added the Execute function on static parameterless methods - just right-click a static method in code and select Execute :D

    Complex lambdas and generics should also work nicely now, although I know there are still a couple of cases where that may fail. Extension methods and partial types also work now!

    Oh, don't miss the cool things! Unity Magic methods and method overrides get auto-generated now! :cool: Also properties for already declared fields - a trick borrowed from ReSharper (but without "borrowing" ReSharper's lag, hehe :D).

    There were also other cool things, I guess, can't remember them all... Like version control integration for example - my personal favorite feature.
     
    mcmorry likes this.
  14. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Seriously great. I need more time to work on my own projects so j can use SI3 more.
     
    Flipbookee likes this.
  15. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Not on the lastest (3.0.6 I think), I updated to 3.0.7 after that ...

    Code (CSharp):
    1.  NullReferenceException: Object reference not set to an instance of an object
    2. FGTextBuffer.EndEdit () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:1269)
    3. ScriptInspector.FGTextEditor.DoGUI (Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:3175)
    4. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2763)
    5. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2621)
    6. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1061)
    7. 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)
    8.  
    For the lastest, using var in some cases does not interference to the correct type
    Code (CSharp):
    1. var strList     = PlayerSettings.GetScriptingDefineSymbolsForGroup(btg).Split(";");
    Thanks
     
    Flipbookee likes this.
  16. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    That code line works just fine for me in 3.0.7. :s Can you show me how is btg declared? Is that in 3.0.7 or 3.0.6?

    That error log is also from an older version, no use of that man ;)
     
  17. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Bad news for today, this time 3.0.7 :)

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ScriptInspector.ConstructedTypeDefinition.BaseType () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:2532)
    3. ScriptInspector.ConstructedTypeDefinition.DerivesFromRef (ScriptInspector.TypeDefinitionBase& otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:2638)
    4. ScriptInspector.TypeDefinition.DerivesFromRef (ScriptInspector.TypeDefinitionBase& otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:3411)
    5. ScriptInspector.TypeDefinitionBase.DerivesFrom (ScriptInspector.TypeDefinitionBase otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:1968)
    6. ScriptInspector.FGTextEditor.DerivesFromOrContains (ScriptInspector.SymbolDefinition symbol, ScriptInspector.TypeDefinitionBase type) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6561)
    7. ScriptInspector.FGTextEditor.<FilterCompletions>m__52 (ScriptInspector.SymbolDefinition x) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6541)
    8. System.Collections.Generic.HashSet`1[ScriptInspector.SymbolDefinition].RemoveWhere (System.Predicate`1 predicate)
    9. ScriptInspector.FGTextEditor.FilterCompletions (System.Collections.Generic.HashSet`1 data) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6541)
    10. ScriptInspector.FGTextEditor.Autocomplete (Boolean suggestionsOnly) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6501)
    11. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2738)
    12. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2606)
    13. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1069)
    14. 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)
    15.  
     
    Flipbookee likes this.
  18. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Okay, that's better now ;)
     
  19. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Bad news for today, not really sure how it happens, seems to be errors in my scripts ... Can not reproduce by now

    Code (CSharp):
    1. FormatException: Input string was not in a correct format.
    2. System.String.ParseFormatSpecifier (System.String str, System.Int32& ptr, System.Int32& n, System.Int32& width, System.Boolean& left_align, System.String& format) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:2495)
    3. System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:1923)
    4. System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:1873)
    5. System.String.Format (System.String format, System.Object arg0) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:1853)
    6. ScriptInspector.SnippetCompletion.CompletionDisplayString (System.String styledName) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/CodeSnippets.cs:49)
    7. ScriptInspector.FGListPopup.ItemDisplayString (ScriptInspector.SymbolDefinition symbol, System.String styledName) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGListPopup.cs:55)
    8. ScriptInspector.FGListPopup.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGListPopup.cs:605)
    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. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    11. 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:232)
    12. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    13. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:185)
    14. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:178)
    15. UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:74)
    16.  
     
    Flipbookee likes this.
  20. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Thanks man! I'll fix it, looks like some check is missing there...
     
  21. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    Hi Flipbookee,
    I was just wondering if you have a roadmap for SI3? I've almost exclusively been using SI3 for my coding except for a couple of situations. The main 3 things I could really use are:
    1. Some form of renaming/refactoring
    2. Bookmarks!! (I do use #region as pseudo bookmark, but real bookmarks would be very helpful in navigating a large codebase).
    3. Automatic XML function header creation from function declaration.

    SI3 is easily the most productive plugin I own.
     
    Last edited: Oct 13, 2015
    Flipbookee likes this.
  22. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @FireMutant There's no actual roadmap, just a general (always growing) list of features that I plan to add, with flexible priorities mostly driven by user's requests (and dependencies, of course).

    Thanks for posting your list of most wanted features! All those features are planned and bookmarks and XmlDoc are the easy ones, so I'll try to sneak those in between some other tasks. ;) Renaming has dependencies on Find All References, and other refactorings will be coming after Rename.

    Thanks man!!! :D
     
  23. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @thienhaflash All issues you reported for 3.0.7 (and many other you didn't report) are fixed now :)

    @mcmorry I need your help again :) Can you please check is your fix going to work if you remove the line with OpenAtCursor();? This line is doing the same thing as the one below that, except that this does that directly while the other one does that indirectly, so one of these two has to be removed... Please check is the fix working when used in a Si3 view in the Inspector as well :)

    I'm trying to wrap all the fixes up for 3.0.8 now...
     
  24. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Brilliant, man ! Looking forward for the fix !
     
    Flipbookee likes this.
  25. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Here I am :)
    I'll check it now.
     
    Flipbookee likes this.
  26. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Ok, so both lines work in the same way. I tested both individually, in the inspector and in a Si3 view.
    So is up to you what you prefer to keep.
    Tested in Unity 5.2.1p3.
     
    Flipbookee likes this.
  27. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    mcmorry likes this.
  28. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hey hey, my friends!
    Script Inspector 3 - version 3.0.8
    is available now on Asset Store

    Please update your projects :)

    @thienhaflash Update your projects as well :p and thanks for all your help!

    This is the change log for 3.0.8:
    - Updated editor scripts rules for Unity 5.2.1p4 and newer versions
    - Unity 5+: Allowed editing assets of DefaultAsset type (currently for files of type: md, xaml, text, bat, cmd, sh, command, ini, rsp, plist, log, and lua)
    - Smart semicolon placement (optional and disabled by default) - thanks @Novack
    - Added alternative shortcut for Redo - Ctrl+Y (Cmd-Y on OS X) - thanks @Victor_Kallai
    - A smarter set of characters that trigger accepting suggested completions - thanks @Adam Buckner
    - Color themes now support different colors for punctuators and operators - thanks @Korindian
    - Tweaked Monokai tooltip colors - thanks @mcmorry
    - Slightly increased font size in auto-complete lists - thanks @mcmorry
    - Implemented the special handling of Nullable LHS operand for the null-coalescing operator
    - Fixed code generator for override methods - thanks @thienhaflash
    - Fixed an error in Execute Static Method command (Ctrl/Cmd+E) - thanks @mcmorry
    - Fixed resolving generic methods overloaded with a non-generic one - thanks @mcmorry
    - Fixed code generator for relative names of members of a nested types and nested namespaces - thanks @mcmorry
    - Fixed duplicated suggestions of enums and constructors after new
    - Fixed resolving of qualified identifiers in explicit interface implementation methods
    - Fixed implicit conversions of Nullable types to their underlying type - thanks @Victor_Kallai
    - Fixed resolving conversions for constructed generic types
    - Fixed Open at Line shortcut in Unity 5 on OS X - thanks @mcmorry
    - Fixed an error in ConstructedTypeDefinition.BaseType() - thanks @thienhaflash
    - Fixed the error when trying to open a built-in shader in Si3
    - Fixed Find Results window after searching for text that starts or ends with whitespace characters

    Thank you all! :cool:
     
    mcmorry likes this.
  29. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Great update! Looking forward for the next one :D
    Go Go Go!
     
    Flipbookee likes this.
  30. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    I'm not sure if you are aware of the problem with generic class or not, so I think I should report anyway. When you declare a class as type <T> where T : SomeClass, the completion does not work correctly for T property / fields. It's showing grammatical errors and no completion

    Also when I declare using for generic classes like MyClass = MyClassT<A>; SI3 does not understand MyClass, although normal using like using Debug = UnityEngine.Debug works just fine ...
     
    Last edited: Oct 17, 2015
    Flipbookee likes this.
  31. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @thienhaflash I know about the first case (I'll fix that) but I didn't know about the issue with "using" and generic types. It should be an easy fix, let me check... Great finds, thanks a lot!!!
     
  32. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    I'm not sure if it's Unity or SI3 but seems that I can not type the shift + 1 to have the ! symbol. Anyone got the same problem ? Other symbols @#$%^&* are working just fine

    And, bad news for today. I'm on lastest SI v3.0.8. Not sure if this error persist but, I'm having something like this
    Code (CSharp):
    1. public void Reset(int[] values){}
    2.  
    3. // then trying to add another overload
    4.  
    5. public void Reset(params int[] )
    6.  
    7. // it ends up in error when I was typing
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ScriptInspector.MethodGroupDefinition.ResolveMethodOverloads (Int32 numArguments, System.Collections.Generic.List`1 argumentTypes, ScriptInspector.Modifiers[] modifiers, System.Collections.Generic.List`1 candidates) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:3908)
    3. ScriptInspector.MethodGroupDefinition.ResolveMethodOverloads (System.Collections.Generic.List`1 argumentTypes, ScriptInspector.Modifiers[] modifiers, ScriptInspector.Scope scope, ScriptInspector.Leaf invokedLeaf) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:3864)
    4. ScriptInspector.MethodGroupDefinition.ResolveMethodOverloads (ScriptInspector.Node argumentListNode, ScriptInspector.SymbolReference[] typeArgs, ScriptInspector.Scope scope, ScriptInspector.Leaf invokedLeaf) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:3718)
    5. ScriptInspector.SymbolDefinition.ResolveArgumentsNode (ScriptInspector.Node argumentsNode, ScriptInspector.Scope scope, ScriptInspector.Leaf invokedLeaf, ScriptInspector.SymbolDefinition invokedSymbol, ScriptInspector.SymbolDefinition memberOf) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:7509)
    6. ScriptInspector.SymbolDefinition.ResolveNode (ScriptInspector.BaseNode baseNode, ScriptInspector.Scope scope, ScriptInspector.SymbolDefinition asMemberOf, Int32 numTypeArguments, Boolean asTypeOnly) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:8152)
    7. ScriptInspector.FGResolver.ResolveNode (ScriptInspector.Node node) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:10661)
    8. UnityEngine.Debug:LogException(Exception)
    9. ScriptInspector.FGResolver:ResolveNode(Node) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:10667)
    10. ScriptInspector.FGTextEditor:GetTokenStyle(SyntaxToken) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:4521)
    11. ScriptInspector.FGTextEditor:DoGUI(Boolean) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:4127)
    12. ScriptInspector.FGTextEditor:DoGUIWithAutocomplete(Boolean) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2769)
    13. ScriptInspector.FGTextEditor:OnWindowGUI(EditorWindow, RectOffset) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2618)
    14. ScriptInspector.FGCodeWindow:OnGUI() (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1069)
    15. UnityEditor.DockArea:OnGUI()
    16.  
     
    Last edited: Oct 18, 2015
    Flipbookee likes this.
  33. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @thienhaflash I can type Shift+1 and I get the exclamation mark without any problems. Check your main menu, look for a menu item with the Shift+1 shortcut. Or try typing that in a search box for example somewhere in Unity Editor... Does anyone else have the same issue?

    Thanks for the great repro steps for that error! :)
     
  34. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    On Mac is ok!
     
    Flipbookee likes this.
  35. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @thienhaflash I just fixed that error while trying to resolve params parameter, thanks man! :)
     
  36. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Bad news for today

    This error occurs when I was trying to add the [Serializable] meta to a class, not sure if it's persist or not ...

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ScriptInspector.ConstructedTypeDefinition.<BaseType>m__6E (ScriptInspector.SymbolReference x) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:2523)
    3. System.Collections.Generic.List`1[ScriptInspector.SymbolReference].GetIndex (Int32 startIndex, Int32 count, System.Predicate`1 match) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:313)
    4. System.Collections.Generic.List`1[ScriptInspector.SymbolReference].Exists (System.Predicate`1 match) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:210)
    5. ScriptInspector.ConstructedTypeDefinition.BaseType () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:2522)
    6. ScriptInspector.ConstructedTypeDefinition.DerivesFromRef (ScriptInspector.TypeDefinitionBase& otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:2648)
    7. ScriptInspector.TypeDefinition.DerivesFromRef (ScriptInspector.TypeDefinitionBase& otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:3428)
    8. ScriptInspector.TypeDefinitionBase.DerivesFrom (ScriptInspector.TypeDefinitionBase otherType) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs:1968)
    9. ScriptInspector.FGTextEditor.DerivesFromOrContains (ScriptInspector.SymbolDefinition symbol, ScriptInspector.TypeDefinitionBase type) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6586)
    10. ScriptInspector.FGTextEditor.<FilterCompletions>m__52 (ScriptInspector.SymbolDefinition x) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6566)
    11. System.Collections.Generic.HashSet`1[ScriptInspector.SymbolDefinition].RemoveWhere (System.Predicate`1 predicate)
    12. ScriptInspector.FGTextEditor.FilterCompletions (System.Collections.Generic.HashSet`1 data) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6566)
    13. ScriptInspector.FGTextEditor.Autocomplete (Boolean suggestionsOnly) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:6467)
    14. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2750)
    15. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2618)
    16. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1069)
    17. 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)
    18.  
     
    Flipbookee likes this.
  37. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @thienhaflash Thanks man! What would I do without you ;)

    Fixed now! :D
     
  38. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Glad it fixed, you are excellent man ! Anyway, bad news for today ...

    This time, it occurs when I press F12 on a static method, something like this
    Code (CSharp):
    1. B2_Commandline.GetMoveCmd()
    The function does not exist actually, but another signature does exist
    Code (CSharp):
    1. static public string GetMoveCmd(string from, string to){}
    Still not really sure what caused it, hopefully you can figure it out :)

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. FGTextBuffer.GetTokenSpan (ScriptInspector.Leaf parseTreeLeaf) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:2404)
    3. FGTextBuffer.GetParseTreeNodeSpan (ScriptInspector.BaseNode parseTreeNode) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextBuffer.cs:2432)
    4. ScriptInspector.FGTextEditor.GoToSymbolDeclaration (ScriptInspector.SymbolDeclaration declaration) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:9594)
    5. ScriptInspector.FGTextEditor.GoToDefinition () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:7035)
    6. ScriptInspector.FGTextEditor.ProcessEditorKeyboard (UnityEngine.Event current, Boolean acceptingAutoComplete) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:7240)
    7. ScriptInspector.FGTextEditor.DoGUI (Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:3455)
    8. ScriptInspector.FGTextEditor.DoGUIWithAutocomplete (Boolean enableGUI) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2760)
    9. ScriptInspector.FGTextEditor.OnWindowGUI (UnityEditor.EditorWindow window, UnityEngine.RectOffset margins) (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTextEditor.cs:2618)
    10. ScriptInspector.FGCodeWindow.OnGUI () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1069)
    11. 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)
    12.  
     
    Flipbookee likes this.
  39. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Yes, this might be because unresolved method calls get resolved to their method group (a set of methods with the same name) which is implicitly defined by the methods in it. Then the attempt to find the definition of that method group fails because it doesn't exist, so I'll have to do something smarter in this case, either jump to the definition of that one existing method or show a list of all methods that actually exist... Before adding the support for partial types there was no UI to show a list of multiple definitions, so I couldn't do that in the past, but now I can! Seems like I forgot to do that :p good that you reminded me ;)
     
  40. Victor_Kallai

    Victor_Kallai

    Joined:
    Mar 5, 2014
    Posts:
    123
    @Flipbookee
    Hey, I do not know if you have a roadmap, but it would be amazing to include a "Find all references" feature for methods and fields. Cheers!
     
    Flipbookee likes this.
  41. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Yes, yes! Find All References will be added either with the first next release (next week) or the one right after that :)
     
    UnLogick and Victor_Kallai like this.
  42. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    The CMD+Z button doesn't support repetition. I mean that if I keep it pressed, it doesn't continue to undo.
    I don't know if is a bug or is by design, but is not standard and uncomfortable (at least for me :) )

    EDIT: I just found that CTRL+Z works correctly. So I suppose that it's a problem with the workaround for Mac :(
     
    Last edited: Oct 24, 2015
    Flipbookee likes this.
  43. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Yes, it must be something with that. I'll check but it will be great if we can get some help from @inventor2010 as well.
     
  44. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    This is fixed now as well :)

    Replace function is kind of working now, but it needs a little bit of testing and some polishing. ;) It will be released in a few days :D

    A question: Is anyone using the Immediate Window editor extension from Asset Store? https://www.assetstore.unity3d.com/en/#!/content/3961
    If not, why? If yes, would you be interested in using something like that but with all the features that come in Si3?
     
  45. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I just realized that I have it in my wish list (that is too crowded now). So I never tried it but looks interesting.
    Sometime I wish I could call some methods while in play mode for debug purpose.
    The best would be to have an optional drag & drop input field inside the window to drag the GameObject that I would like to use and expose it as a special var in the immediate script, so that will be possible to access its components and methods.

    EDIT: The Selection object is ok (as it's used in that asset), but then I have to select the object every time before to run the script. With a drag & drop method I could also have multiple immediate windows acting on different objects.
     
    Flipbookee likes this.
  46. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Yes, that's an interesting idea! I've never thought of that :) Selection.gameObjects[0] was kind of enough for me, but this sounds nicer.

    I use a modified version of this asset that allows me to have multiple windows with different code snippets in each of them. :D

    Some time ago @UnLogick sent me an update for the Execute Method feature that supports executing parameterless methods on instances as well, so this would be another alternative to your need to execute methods from editor, but you'd still have to select the GameObject you want to run the method on... I'll try to get that code into Si3!
     
    mcmorry likes this.
  47. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Just found a small issue.
    Class C inherit from class B that inherit from abstract class A.
    In class A I have an abstract method "Stop()", implemented in class B and overridden in class C.
    In Class C i call "base.Stop()". When I ask Si3 to go to definition it jumps to the abstract method in Class A instead of jumping to the implemented method in class B.
    I hope it makes sense :)
     
    Flipbookee likes this.
  48. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @mcmorry Yes, I know about this and I'll have to change that. This is happening because of the way how resolving the method overloads works in C# - all the methods marked as "override" methods are ignored, so all the virtual method calls at compile time resolve to either a virtual or to an abstract method in the class hierarchy where that method was first introduced. Then at runtime that call will actually call the corresponding override method...

    Now see, even though this rule defines how the compiler understands some code, Si3 must use that same rule to find the correct method overload, and it does that, but then it should also find the corresponding override method in a derived class because that makes sense for Go To Definition. This second part is currently missing, but it's easy enough to add that as well. Thanks for pointing this out!

    Besides the plain Go To Definition it would be also nice to have options to easily navigate to other overloads of a method and to the implementation in a base class or an override in a derived class - I should look at adding these too...
     
    mcmorry likes this.
  49. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    No hurry :) piece by piece the big puzzle will be completed.
     
    Flipbookee likes this.
  50. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Sure! :) This is kind of easy, all the information is already in Si3, it just needs some nice UI to present that... I've already changed the Go To Definition for unresolved method overloads to show a list of all overloads :cool:
     
    mcmorry likes this.