Drawing tooltips without background

Back
Tags:
Marker
Tooltip
Example of how to draw tooltip without a background.
Usage instructions:
Add this script to map GameObject and start the scene.
Hover over a marker.
Tooltips of the markers will be drawn without a background.
TooltipWithoutBackgroundExample.cs
/*         INFINITY CODE         */
/*   https://infinity-code.com   */

using UnityEngine;

namespace InfinityCode.OnlineMapsExamples
{
    /// <summary>
    /// Example of how to draw tooltip without a background.
    /// </summary>
    [AddComponentMenu("Infinity Code/Online Maps/Examples (API Usage)/TooltipWithoutBackgroundExample")]
    public class TooltipWithoutBackgroundExample : MonoBehaviour
    {
        private void Start()
        {
            // Subscribe to the event preparation of tooltip style.
            OnlineMapsGUITooltipDrawer.OnPrepareTooltipStyle += OnPrepareTooltipStyle;
        }

        private void OnPrepareTooltipStyle(ref GUIStyle style)
        {
            // Hide background.
            style.normal.background = null;
        }
    }
}