1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. Unity 2017.1 beta is now available for download.
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  8. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice

Script Inspector 3

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

  1. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    1,968
    Oh, thanks a lot! That's a great find :) and it's super-cool that you managed to trace the issue up to there! :eek: Yeah, it gets a bit complicated, so I'll take care of it.
     
    Andrew_Howe likes this.
  2. jrDev

    jrDev

    Joined:
    Nov 5, 2008
    Posts:
    1,543
    Hey Flipbookee,

    Any fix for the comments indentation problem yet?

    Thanks,
    jrDev
     
    Flipbookee likes this.
  3. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    1,968
    Uh, I forgot about that. Let me check...
     
    jrDev likes this.
  4. jrDev

    jrDev

    Joined:
    Nov 5, 2008
    Posts:
    1,543
    Hey Flipbookee,

    I also found a bug introduced in this version update. Sometimes when I hit Command+Shift+T to hide, a new copy of all my script tabs would be created.

    Thanks,
    jrDev
     
  5. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    1,968
    Do you mean like another floating window with the same scripts shows up? That's weird. I'll check...
     
  6. jrDev

    jrDev

    Joined:
    Nov 5, 2008
    Posts:
    1,543
    Yes.

    Thanks,
    jrDev
     
  7. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    1,968
    Hey @jrDev, I cannot reproduce that bug and I checked the code - it seems impossible for something like that to happen! I'm sure something went wrong, but I have no idea what that might be, so I'll appreciate any help with reproducing this bug!

    First thing that comes to my mind, did you get any errors in the Console when this happens? Second, what Unity version and OS was that? And third, how often does that happen?

    Thanks!
     
  8. Andrew_Howe

    Andrew_Howe

    Joined:
    Sep 22, 2015
    Posts:
    2
    OK I hope you're having fun with my previous bug, but I have a new one :) And I suspect this one will be harder to fix :(

    Code (CSharp):
    1.  
    2. using System.Linq.Expressions;
    3. class X
    4. {
    5.     public static void Foo<TValue>(Expression<Func<TValue>> selector) {} // not this one
    6.     public static void Foo<T, TValue>(T instance, Expression<Func<T, TValue>> selector) {} // this one
    7.     public int Bar {get; set;}
    8.     public void Oops()
    9.     {
    10.         Foo(this, (X x)=>x.Bar); // manually qualify type, works
    11.         Foo(this, x=>x.Bar);     // squigglies under "Bar", but it has compiled fine. T was inferred from instance.
    12.     }
    13. }
    The use case is a sweet system I have for changing & reverting project settings. Foo actually does a bunch of stuff, but the basic pattern is that you can't have a reference to a property in C#, but you can pass a lambda expression and walk it with System.Linq.Expressions. 'x' should be inferred from 'this', and in fact it is by the compiler. But your editor doesn't figure it out - it knows which Foo is being used, and it knows T is X. Unfortunately it doesn't figure out the connection between the lambda and the Expression - x should be a T (i.e. X). But that might be difficult to fix, I guess.
     
    Flipbookee likes this.