Tooltip

Applies to: properties

Namespace:

namespace Lenga\Engine\Attributes;

Attaches a descriptive tooltip to a serialized property in the Inspector. When the user hovers over the field label, the tooltip text is shown as a pop-up hint, improving discoverability without cluttering the layout.

Parameters

Parameter Type Description
$tooltipText string The text shown when hovering over the field in the Inspector.

Example

use Lenga\Engine\Attributes\Tooltip;
use Lenga\Engine\Core\Behaviour;

class PlayerController extends Behaviour
{
    #[Tooltip('Movement speed in units per second.')]
    public float $speed = 5.0;

    #[Tooltip('Multiplier applied to speed when sprinting. Values above 2 may feel unresponsive.')]
    public float $sprintMultiplier = 1.5;
}