Snapshot

Description

The Snapshot API provides access to the path that snapshots are saved to. This path is that provided in Settings > General > Snapshots. Snapshots may be taken using Window API functions such as Window.takeSnapshot.

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

Methods

Name Return Value Summary
getSnapshotsLocation string Gets the path that snapshots are saved to.
setSnapshotsLocation None Sets the path that snapshots are saved to.

Signals

Name Summary
snapshotLocationSet Triggered when the path that snapshots are saved to is changed.

Method Details

(static) getSnapshotsLocation( ) → {string}
Returns: The path to save snapshots to.

Gets the path that snapshots are saved to.

(static) setSnapshotsLocation( location )

Sets the path that snapshots are saved to.

Parameters

Name Type Description
location String The path to save snapshots to.

Signal Details

snapshotLocationSet( location )
Returns: Signal

Triggered when the path that snapshots are saved to is changed.

Parameters

Name Type Description
location string The new snapshots location.
Example

Report when the snapshots location is changed.

// Run this script then change the snapshots location in Settings > General > Snapshots.
Snapshot.snapshotLocationSet.connect(function (path) {
    print("New snapshot location: " + path);
});