Search Unity

EditorUtility.SetWireframeHidden also hides Selection Outline

Discussion in '5.5 Beta' started by karl_, Sep 2, 2016.

  1. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    It would be nice to be able to control these independently.

    For example, in ProBuilder I need to render a special wireframe for quads and ngons, but still want the selection outline.
     
    00christian00 and SweetJV like this.
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,163
    Hi. Is this the API you mean? I can't find it in the docs or the source code.

    Do you mean: SetSelectedWireframeHidden?
     
  3. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,163
    I've added some API for this. It will be in an upcoming beta (probably not the next one though :( )
     
  5. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    That's great news, thanks!
     
  6. Dambusters

    Dambusters

    Joined:
    Jan 6, 2012
    Posts:
    52
    Hi Tim, Noticed you said you were working on the API for this...
    I've just installed 5.5.0B5 and am now getting an error: does not contain a definition for " UnityEditor.EditorUtility.SetSelectedWireframeHidden" - do you know if it's been moved elsewhere or is it a bug?
     
  7. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,163
    Oh wow. really subtle bug in a code generation tool here. It's been marked as private. Will fix.

    Anyway please use:
    SetSelectedRenderState as the other one is marked as obsolete anyways.
     
  8. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,163
    I've pushed a fix. It will make it's way back to 5.5 in an upcoming beta.
     
  9. Dambusters

    Dambusters

    Joined:
    Jan 6, 2012
    Posts:
    52
    Thanks for the prompt reply Tim, I happened to notice as it threw an error on a popular 3rd party plugin "Particle Playground" - good to catch it before it got to a release!
     
  10. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,163
    yeah it is. really sorry about causing this. We have some auto generation stuff and it behaves differently when binding to C++ vs pure c# functions. I changed this to be a wrapper around SetSelectedRenderState so it went from being c++ binding to c# and it changed the access level. Woops. *The more you know*
     
  11. Dambusters

    Dambusters

    Joined:
    Jan 6, 2012
    Posts:
    52
    Wow, as you said "subtle"! :confused:
     
  12. jc-drile77

    jc-drile77

    Joined:
    Jul 1, 2014
    Posts:
    229
    This breaks some Ferr2D functionality :(
     
  13. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    If it wouldn't be too much trouble, could we also get a matching GetSelectedRenderState function?

    The goal being to push the render state when our tool is engaged, then pop it back when we're finished. Or better yet, some way to temporarily override the selection gizmo rendering (so that we don't have to manage that state ourselves, which has room for error).
     
  14. Dambusters

    Dambusters

    Joined:
    Jan 6, 2012
    Posts:
    52
    Hi Tim,
    I was very disappointed to see that this has still not been restored in 5.5.0B6 or now in 5.5.0B7

    This breaks lots of independent packages (like Particle Playground) and I don't want to start ripping apart 3rd party code to try to get it working. The upshot is that I can't use the latest beta releases on this project (and I need some of the other new features that the 5.5 Beta provides).

    I know it's probably out of your hands and that you fixed it and pushed the fix on 27/9 and I appreciate it might have missed the B6 release date - but now B7 too? It's not like it needs extensive testing as it's just putting things back the way they were!

    Any idea how long this will take to eventually trickle through?
     
    jc-drile77 likes this.
unityunity