No tooltips with 2022.2.1 update

Hey,

I recently upgraded to 2022.2.1 and now tooltips that worked fine before will not show up anymore.

Just downgraded the project to 2022.2.0 to verify they work with that version.

Has anything been changed we need to take care of now or is this a bug?

Hello,

Could you provide additional details?

  • Are these your custom tooltips that you wrote for your project? Or are these tooltips the ones in the UI Builder?
  • Do you do any custom event handling on the tooltip?
  • Could you provide a code example of how you set the tooltip?

Thank you!

I set the tooltip when creating the visual element in C#. Actually everything (custom node graph) is done in C# without any style files.

This is the actual code:

Label = new Label();
Label.name = "Attribute Label";
Label.text = label;
Label.style.width = NodeElement.Node.GetDefaultLabelWidth();
Label.style.unityTextAlign = Attribute.LabelTextAnchor;
Label.style.alignSelf = Align.Stretch;
Label.style.overflow = Overflow.Hidden;
Label.style.marginRight = -3;
Label.tooltip = CreateTooltip();
Label.RegisterCallback<PointerDownEvent>( LabelPointerDownHandler );

CreateToolip() uses a StringBuilder to create the actual tooltip string, which contains some rich text flags (size and color). Now that I know it works with 2022.2.0 I can switch back to 2022.2.1 and see if the PointerDownEvent or rich text has any impact.

8673957--1168803--upload_2022-12-19_22-16-3.png

Removing the callback and changing the tooltip to a fixed string has no impact. The tooltip is still not showing up using 2022.2.1.

Label.tooltip = "ABC";
//Label.RegisterCallback<PointerDownEvent>( LabelPointerDownHandler );

I just discovered the exact same problem a few minutes ago. Custom-coded UIElements where I set the tooltip worked in 2022.1 but no longer. No rich text involved, just stuff like:

public TpImageToggle(Action<bool> callback,
                         string                           name,
                         string                           tooltip,
                         float                            height,
                         Texture2D                        icon
                         )
    {
     
        this.callback      = callback;
        this.name          = name;
        this.tooltip       = tooltip;
        ..... etc

Not a single tooltip works.

Incidentally, this project includes an IMGUI element, and tooltips from IMGUI code work properly, although I’m sure that this is irrelevant.

If it helps, UI builder was not involved at all, I don’t use it.

I am experiencing a similar issue. I have made a custom property drawer using IMGUI, and after upgrading Unity from 2020.3.40f1 to 2022.2.6f1 some of the tooltips have stopped working.
It seems like only the tooltip on the first line drawn stopped working.
They are all made the same way, like this:

EditorGUI.LabelField(fieldRect, new GUIContent(desc.description, desc.longDescription));