Search Unity

BaseAction with ITooltip

Discussion in 'EditorXR' started by De-Panther, Jul 13, 2017.

  1. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    Hey,

    We have a class that derived from BaseAction, and we wanted to be able to change it's tooltip text according to some conditions.

    So we added the ITooltip to our class, and we successfully change the tooltip text.
    BUT now it seems that there's a duplication of a tooltip object in the scene with the texts from our class.
    In some cases(when we point with a controller on a button with tooltip), another tooltip is created in the center of the scene, and show the texts of our class tooltip...

    What is the right way to change tooltip text or action icon for a BaseAction class?
     
  2. unity_andrewm

    unity_andrewm

    Unity Technologies

    Joined:
    Jun 25, 2015
    Posts:
    73
    Hi,

    I'm trying to reproduce your issue. Not having luck yet - I took one of our base actions (Delete), had it implement ITooltip and even made the getter have conditional text. Could you share a code snippet or your example with me?

    Thanks!
     
  3. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    Tried to pin point the problem, it seems that it's enough to implement the ITooltip for this to happen.
    The tooltip in the center of the screen, appear when I select an object and pointing at it with one of the controllers.

    Thanks
    upload_2017-7-17_14-6-26.png
     

    Attached Files:

  4. unity_andrewm

    unity_andrewm

    Unity Technologies

    Joined:
    Jun 25, 2015
    Posts:
    73
    Thanks for the script + details. I have now reproduced this bug and am tracking it down. Will post the issue # as soon as I figure out more details.
     
    De-Panther likes this.
  5. unity_andrewm

    unity_andrewm

    Unity Technologies

    Joined:
    Jun 25, 2015
    Posts:
    73
  6. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589