UI Visual Not Moving With Transform

I’ve had a working tooltip in my game for months but recently this issue has started cropping up (since upgrading to 5.6 and now 2017) and I really want to solve it without reconsidering the design. The idea is that when the player hovers over certain UI elements, a tooltip shows up by the item they’re hovering over (a tooltip).

The UI Elements that trigger the tooltip have an Pointer Enter, Exit, Select, and Deselect listeners that enable/disable and position the tooltip.

In the image below you can see the visual isn’t where the rect transform is. The transform is set up so that the root object contains the blue background and a child element contains the textmeshpro element.

alt text

Any ideas what could be causing this? The transform values are set just fine (verified in inspector) and the container/rect transform is precisely where it should be, yet the visual simply isn’t updating.

I found a fix. Instead of disabling/enabling the gameobject the same frame it moved via the tooltip activation I set the canvasgroup alpha on the tooltip to 0.

If I had to guess it has something to do with the canvas redrawing itself and then moving it all at once. By tweening the canvasgroup alpha instead, it could avoid this and update the position.

I would suggest yielding a frame for anyone who experiences this in the future–or just using the canvas group and hiding the tooltip.