tooltip
Decorator that adds a tooltip to a property in the inspector UI.
| Type | Name | Interface Description |
|---|---|---|
| Functions | tooltip(content: string): (target: any, key: string) => any | • Function: Decorator that adds a tooltip to a property in the inspector UI. Provides additional information or context when users hover over the property field. Parameters • Returns Property decorator function |
Example
@component()
export class AdvancedSettings extends APJS.BasicScriptComponent {
@serializeProperty()
@tooltip("Controls the overall brightness of the scene")
@slider(0, 2, 0.1)
public globalIllumination: number = 1;
@serializeProperty()
@tooltip("Higher values create more realistic shadows but impact performance")
@spinBox(512, 4096, 512)
public shadowResolution: number = 2048;
}