How to Add Hovering Tooltips [Unity Tutorial]

preview_player
Показать описание
We've all seem them and we all know they're super useful! Floating tool tips! In this video I'm going to show you a quick and reusable way to add floating tooltips along side your mouse cursor. They're going to automatically size to fit your text and they're going to take your game to the next level!

Join me and learn your way through the Unity Game Engine, the C# language and the Visual Studio editor. Remember, if this video was useful then DROP A LIKE! 👍

🤩 SPONSORED LINKS:

Check out HEXED PERSPECTIVE:

💯 Want to help me out and allow me to keep making these tutorials? Consider supporting the channel on Patreon:

😍 AWESOME high quality 3D game assets available here:

💬 Join the Discord community here:

📱 Find us on social media for more Tips and Tricks:

📱 Play our games for FREE here on Google Play:
Рекомендации по теме
Комментарии
Автор

Exactly what I'm doing now! Amazing and simple! Thank you very much!

gamedevengineer
Автор

Like one of the other commenters, this method worked great except that the tooltip spawned far away to the right. I copied the code exactly and made sure my anchors and pivots were all the same. I got to looking at the math for the tooltip position. It seems "mousePos.x + tipWindow.sizeDelta.x * 2" takes mousePos.x and adds double the width of the tooltip window to establish its position. That alone would explain why it shows up so far away from the hover point. To correct this I had to do "mousePos.x + tipWindow.sizeDelta.x / 2" so that the tipWindow (which would normally show up centered on the hover point) only moves half its length to the right.

allenbagwell
Автор

Love it. I'm still hoping you'll make a full length tutorial on all things UI because I find you're videos easy to learn from. PS: Almost at 5000 subscribers I see, keep it up, you're almost there !!

kyleme
Автор

These small details make a difference. Thank you, I learned a lot from this one.

DreamPharaoh
Автор

Everything clearly explained, thank you!

gigichui
Автор

I don't know if I messed something up but when I hover over an image that I applied the HoverToolTip Script on it spawns the tool tip really far away from it

elite_ramsay
Автор

This was so useful! Thank you so much!!!

filipparonovits
Автор

Awesome, looks clean. A nice simple touch to this would be adding the [TextArea] attribute to the 'tipToShow' string field.

lvx
Автор

I looked across the whole ocean of the internet to see the bit from 9:20 onwards. Thank you!

Pegaryx
Автор

Very useful stuff, Mike! The only thing I'd also like to hear about is how to place tip from the other side of the cursor if it's near the screen edge (no room for 200px tip on the right)

victorlapin
Автор

Great. For resizing of the text box Unity has a Content Size Fitter component. Easy peasy.

ThePancakeJedi
Автор

thank you very much, now I can continue my School Project

doce
Автор

when I tried to scale up the font the back ground didn't scale up what part would I change to get it to just make the box bigger proportionally?

Flamewolf
Автор

Works fine in my MMORPG. I added Hover TIp components to my Inventory Slots (each separately). But when I hover fast over Inventory items and move mouse to the game scene sometimes the Tip doesn't hover at all and it just stays there in a different place than the icon. How to prevent it?

patryksliwa
Автор

While I like that you are teaching the use of events, I can't help but think a static method would be just as good, and slightly simpler in this scenario?

TheSkarri
Автор

Hey mate, nice tutorial! Got a request for one when you've got time. I'm wondering if there's a way to change a Sound Effect based on the Material the player is walking on. Like, if the player is running from sand to grass, or shallow water to mud, what method would you use to detect when to change the Sound Effects?

VoxAndrews
Автор

Works great if you're in a UI, did not work so much in letting me put tooltips over gameobjects. Back to raycasy2d!

ZWHMalokin
Автор

Thank you! How would I make the tip follow the mouse? I cannot figure it out for the life of me

alrob
Автор

hmm strange when i go hover over a different one it will the original tab instead of the new one

Glitchyetiad
Автор

pretty strange usage of events as you ask manager directly to perform a method.

nightyonetwothree
welcome to shbcf.ru