Binds scripts to Events and executes them when triggered. Any script can access the ScriptComponent executing them through the variable script. See also: Scripting Overview, Script Events Guide.

// Bind a function to the MouthOpened event
function onMouthOpen(eventData)
{
print("mouth was opened");
}
var event = script.createEvent("MouthOpenedEvent");
event.bind(onMouthOpen);

Hierarchy (view full)

Constructors

Properties

api: Record<string, any>
enabled: boolean

If disabled, the Component will stop enacting its behavior.

name: string
sceneObject: SceneObject
uniqueIdentifier: string
updatePriority: number

Accessors

  • get boundingHeightOffset(): number
  • Returns number

    how far (in cm) the top edge of the ScrollBar mesh should sit from the edge of the canvas when at the top of the content.

  • set boundingHeightOffset(offset): void
  • Sets the offset between the top edge of the mesh and the edge of the canvas.

    Parameters

    • offset: number

      how far (in cm) the top edge of the ScrollBar mesh should sit from the edge of the canvas when at the top of the content.

    Returns void

  • get isEnabled(): boolean
  • Returns boolean

  • set isEnabled(enabled): void
  • Parameters

    • enabled: boolean

    Returns void

  • get overflow(): number
  • Returns number

  • get scrollPercentage(): number
  • Returns number

Methods

  • 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

  • Returns void

  • Returns void