Problem with anchoring panel tooltip

Paramedic

Member
Previously I was using this tutorial:
To set panel tooltip on right top of item slot. I was forced to use another solution because it was not cooperating with screen space camera, but you fixed it so I tried to set panel tooltip again, but this time it does not work like intended and I have no idea why. When I use the same tutorial like above, now panel tooltip is spawning on the center of item slot:
1678698130806.png
I noticed spawned panel tooltip has wrong pivot after spawning and maybe it is the reason:
1678698215705.png
1678698251747.png

Actually I want to spawn it in different way but I dont know how to set it up, I want it this way:
1678698575351.png

so top right corner of tooltip align to left top corner of item slot.

I tried to manipulate anchors in run time, and seems like pivot Y is ignored
 
Last edited:
I'm verry sorry it seems my fix was broken by another fix I did.

So I rewrote the code and I'm positive it works now.
Please find attached the new tooltip script.

Here are the values to get the result you want:

1678707343246.png
1678707363842.png
 

Attachments

  • ItemViewSlotPanelToTooltip.cs
    20.5 KB · Views: 2
Top