Skip to main content

tooltip

Decorator that adds a tooltip to a property in the inspector UI.

TypeNameInterface Description
Functionstooltip(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

content: - The tooltip text to display

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;
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies