Lens Scripting API

    Class HintsComponent

    Used to display text hints in a Lens.

    If you only need to show one hint on Lens start up, you can configure your project to display the hint without scripting it.

    Hint IDHint Message
    “lens_hint_blow_a_kiss”“Blow A Kiss”
    “lens_hint_come_closer”“Come Closer”
    “lens_hint_do_not_smile”“Do Not Smile”
    “lens_hint_do_not_try_with_a_friend”“Do Not Try With A Friend”
    “lens_hint_find_face”“Find Face”
    “lens_hint_keep_raising_your_eyebrows”“Keep Raising Your Eyebrows”
    “lens_hint_kiss”“Kiss”
    “lens_hint_kiss_again”“Kiss Again”
    “lens_hint_look_around”“Look Around”
    “lens_hint_look_down”“Look Down”
    “lens_hint_look_left”“Look Left”
    “lens_hint_look_right”“Look Right”
    “lens_hint_look_up”“Look Up”
    “lens_hint_make_some_noise”“Make Some Noise!”
    “lens_hint_nod_your_head”“Nod Your Head”
    “lens_hint_now_kiss”“Now Kiss”
    “lens_hint_now_open_your_mouth”“Now Open Your Mouth”
    “lens_hint_now_raise_your_eyebrows”“Now Raise Your Eyebrows”
    “lens_hint_now_smile”“Now Smile”
    “lens_hint_open_your_mouth”“Open Your Mouth”
    “lens_hint_open_your_mouth_again”“Open Your Mouth Again”
    “lens_hint_raise_eyebrows_or_open_mouth”“Raise Your Eyebrows / Or / Open Your Mouth”
    “lens_hint_raise_your_eyebrows”“Raise Your Eyebrows”
    “lens_hint_raise_your_eyebrows_again”“Raise Your Eyebrows Again”
    “lens_hint_smile”“Smile”
    “lens_hint_smile_again”“Smile Again”
    “lens_hint_swap_camera”“Swap Camera”
    “lens_hint_tap”“Tap!”
    “lens_hint_tap_a_surface”“Tap A Surface”
    “lens_hint_tap_ground”“Tap The Ground”
    “lens_hint_tap_ground_to_place”“Tap Ground To Place”
    “lens_hint_tap_surface_to_place”“Tap Surface To Place”
    “lens_hint_try_friend”“Try It With A Friend”
    “lens_hint_try_rear_camera”“Try It With Your Rear Camera”
    “lens_hint_turn_around”“Turn Around”
    “lens_hint_walk_through_the_door”“Walk Through The Door”
    // Create the hints component
    var hintsComponent = script.getSceneObject().createComponent("Component.HintsComponent");

    // Show "Smile" hint
    hintsComponent.showHint("lens_hint_smile", -1);

    // Wait for smile...
    script.createEvent("SmileStartedEvent").bind(function()
    {
    // Hide the "Smile" hint
    hintsComponent.hideHint("lens_hint_smile");
    });

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    sceneObject: SceneObject

    The scene object this component is on.

    uniqueIdentifier: string

    Methods

    • Destroys the component.

      Returns void

    • Returns the name of this object's type.

      Returns string

    • Hides the hint with id hintID.

      Parameters

      • hintID: string

      Returns boolean

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    • Shows the hint with id hintID for a duration of duration seconds. Use a duration of -1 to keep the hint onscreen forever.

      Parameters

      • hintID: string
      • duration: number

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR