OnPauseEvent
ClassTriggered when users tap the menu button in Palm UI.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported — Available on SPECS only
- SPECSFully supported
- Camera Kit WebNot supported — Available on SPECS only
- Camera Kit MobileNot supported — Available on SPECS only
Triggered when users tap the menu button in Palm UI.
When paused, certain behaviors like animations or script updates continue running in the background, while inputs (e.g., Hand Tracking, Mobile Controller) are disabled to allow the system overlay to take priority. Developers should manage scenarios where the Lens is paused to maintain a seamless experience.
Index
Properties
Methods
Example
Example js
script.createEvent("OnPauseEvent").bind(function (eventData)
{
print("Paused");
});
Example ts
@component
export class NewScript extends BaseScriptComponent {
onAwake() {
this.createEvent("OnPauseEvent").bind(() => {
print("Paused");
});
}
}
Extends
Properties
enabled
enabled:
boolean
If true, the event is able to trigger. If false, the event will not trigger.
Default Value
true
Inherited from
Methods
bind()
bind(
evCallback):void
Binds a callback function to this event.
Parameters
| Parameter | Type |
|---|---|
evCallback | (arg1) => void |
Returns
void
Inherited from
getTypeName()
staticgetTypeName():TypeName<OnPauseEvent>
SPECS
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<OnPauseEvent>
Overrides
getTypeName()
getTypeName():
string
Returns the typename of the SceneEvent.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean