Header
Applies to: properties
Namespace:
namespace Lenga\Engine\Attributes;
Adds a bold label above a serialized property in the Inspector window. Use it to visually group related fields without adding any runtime overhead.
Parameters
| Parameter | Type | Description |
|---|---|---|
$headerText |
string |
The label text to display above the field. |
Example
use Lenga\Engine\Attributes\Header;
use Lenga\Engine\Core\Behaviour;
class PlayerController extends Behaviour
{
#[Header('Movement')]
public float $speed = 5.0;
public float $jumpHeight = 2.0;
#[Header('Health')]
public int $maxHealth = 100;
public int $currentHealth = 100;
}