Topic: uGUI tooltips not working on example

Hi,

I've been studying Online Maps and found out that both uGUITooltip examples doesn't seem to work. At least not out of the box (as I assumed they would).

Basically

OnlineMapsMarker tooltipMarker = OnlineMaps.instance.tooltipMarker as OnlineMapsMarker;

is always null, so nothing is ever drawn.

I did, however, manage to get it working by putting most of the code found in the LateUpdate() method inside the delegate assigned to OnlineMapsMarkerBase.OnMarkerDrawTooltip.

But I am not quite sure this is the correct approach, even more so seeing how the marker is never deleted even when outside the view (it just gets stuck in a corner until I go back to it, then it works just fine).

What would be the correct way to implement custom uGUI tooltips, then? Should I just cache the tooltips and check every frame if they are out of the view?

Re: uGUI tooltips not working on example

Hello

I just checked this example, and everything works well.
tooltipMarker is assigned inside of Online Maps.

Video:
https://www.dropbox.com/s/2svt3rsfi7jbu … 1.mp4?dl=0
Actually this video uses uGUICustomTooltipForAllMarkersExample, but uGUICustomTooltipExample has the same logic.
I hope this will help you understand how it works.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: uGUI tooltips not working on example

I see...

After watching the video, there are two main things I am doing differenlty.

> I am displaying the map using uGUI (an image) instead of the tileset (though I believe this doesn't matter).

> I have "Show Marker Tooltip", in the "Advanced" settings, set to "Always" instead of "On Hover". By doing so, tooltips are no longer drawn (I replicated the setup shown in the video in order to test this).


Are you able to confirm this?

Re: uGUI tooltips not working on example

The problem is «Always».
This example is made for «On Hover».

You can quite easily modify the script to make it work for «Always».
If you need help with this, I can modify it for you.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: uGUI tooltips not working on example

My bad, I thought it would work for every configuration

How should I go about changing it to work with Always, then?

Re: uGUI tooltips not working on example

Example attached.

Post's attachments

Attachment icon uGUICustomTooltipForAllMarkersExample2.cs 2.5 kb, 418 downloads since 2017-01-05 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: uGUI tooltips not working on example

Thank you very much!

Re: uGUI tooltips not working on example

That's great, need this script!
Alex you should include this script to Example API.