Topic: Tooltips always on top.
Hi!
I use "Online Maps" to put some 3D markers on the map. Sometimes i need to show tooltips (it may be one or more at one moment) for placed markers (1 tooltip for 1 marker of course).
The problem is that when i need to show some popup (not GUI), tooltips always show over popup, not behind it.
There is the code i use to my needs:
....
marker3D.OnDrawTooltip += onCustomMarkerDrawTooltip;
....
void onCustomMarkerDrawTooltip(OnlineMapsMarkerBase marker){
OnlineMapsMarker3D tmpMarker = marker as OnlineMapsMarker3D;
Vector2 screenPosition = OnlineMapsControlBase.instance.GetScreenPosition(tmpMarker.position);
GUIContent tip = new GUIContent(tmpMarker.label);
Vector2 size = tooltipStyle.CalcSize(tip);
GUI.Label(new Rect(screenPosition.x - size.x / 2 - 5, Screen.height - screenPosition.y - size.y - 20, size.x + 10, size.y + 5), tmpMarker.label, tooltipStyle);
}
Maybe somebody knows how to put tooltips behind the objects? Thank you!