1 (edited by tobias 2016-03-01 15:58:10)

Topic: uGUI Custom Tooltip Example

Hey Guys!

Your uGUI Custom Tooltip Example is not working for me:
The tooltip is displayed on hover, but not at the marker's position. Instead it shows up in the bottom left corner of the Canvas.

I attached a Screenshot of my Setup.

Thank you in advance

Tobias

Edit: I found out that this only happens in Tileset and Texture - Mode. In GUITexture-Mode the tooltip rendering works just fine.
I'm developing a mobile application so Tileset-Mode is a must.

Post's attachments

Attachment icon Bildschirmfoto 2016-03-01 um 16.13.40.png 172.18 kb, 114 downloads since 2016-03-01 

Re: uGUI Custom Tooltip Example

Hello.

The problem is that we make this example is not for tileset.
Updated (fixed) version of the example is attached.

Post's attachments

Attachment icon uGUICustomTooltipExample.cs 1.88 kb, 147 downloads since 2016-03-01 

Kind Regards,
Infinity Code Team.

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

Re: uGUI Custom Tooltip Example

Wow, that was quick! Thank you very much - it works! smile

Re: uGUI Custom Tooltip Example

Hey Alex,

i've got a follow-up question.

I'm adding markers to the map dynamically from a List ("POIList").
So i tried to modify your example to add tooltips to each marker but my solution is not working - only the last marker in the list gets a tooltip attached...

I guess i have to modify the OnUpdateLate function as well but i can't figure out how...

Here's my code so far:

void Start () {
        Controller = GameObject.FindGameObjectWithTag ("MainController").GetComponent<MainController>();

        for (int i=0; i < Controller.POIList.Count; i++)
        {
            // Create a new marker
            poiMarker = OnlineMaps.instance.AddMarker(new Vector2(Controller.POIList [i].getGpsLong(), Controller.POIList[i].getGpsLat()), null, Controller.POIList[i].getName ());
            
        }

        foreach(OnlineMapsMarker marker in OnlineMaps.instance.markers){
            marker.OnDrawTooltip = delegate {  };
        }

        OnlineMaps.instance.OnUpdateLate += OnUpdateLate;
    }

Re: uGUI Custom Tooltip Example

Hello.

Example attached.

Post's attachments

Attachment icon uGUICustomTooltipForAllMarkersExample.cs 1.99 kb, 145 downloads since 2016-03-02 

Kind Regards,
Infinity Code Team.

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

Re: uGUI Custom Tooltip Example

Thank you again!! Great support!