Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Selection Tool still highlights objects after action is consumed

Discussion in 'EditorXR' started by karl_, Jan 13, 2017.

  1. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    I'm writing a tool that implements it's own highlighting method, but have run into trouble with the built in Selection Tool.

    Despite consuming the action in my tool, any hovered object is still highlighted by the Selection Tool. It does respect trigger input, so my tool works as intended, however it's quite distracting to have the different highlights clashing.

    I do not want to mark my tool as IExclusiveMode, since that prevents locomotion from working properly. Is there another method of marking a ray as having been "used" to prevent tools lower in the stack from reading it's input?
     
  2. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Hi @karl_,

    It's possible that we can create a new interface to disable/enable highlight altogether, but in the meantime, implement ISetHighlight (and possibly IUsesRaycastResults to see what you're hovered over) to set the highlight to false in your tool.

    Would you be willing to add your feature request to github?

    Thanks,
    Amir
     
  3. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    Thanks for the quick reply; that seems to work well enough!

    I'll open an issue on Github as well.
     
    amirebrahimi_unity likes this.