using UnityEngine; public class CustomizeTooltipExample:MonoBehaviour { private void Start() { // Intercepts drawing of marker tooltips OnlineMapsMarkerBase.OnMarkerDrawTooltip += OnMarkerDrawTooltip; } private void OnMarkerDrawTooltip(OnlineMapsMarkerBase marker) { // If the marker has no label returns if (string.IsNullOrEmpty(marker.label)) return; // Customize tooltip style GUIStyle style = new GUIStyle(GUI.skin.label); style.normal.textColor = Color.red; // Calculates the font size based on the width of the screen style.fontSize = Screen.width / 50; // Create GUIContent GUIContent tip = new GUIContent(marker.label); // Calculates size of tooltip Vector2 size = style.CalcSize(tip); // Using the position of the mouse, but you can use the on-screen marker position Vector3 position = Input.mousePosition; // Draw tooltip GUI.Label(new Rect(position.x - size.x / 2, Screen.height - position.y - size.y - 20, size.x + 10, size.y + 5), marker.label, style); } }