TeslasuitDocumentation
APIs

Asset manager

The Asset Manager subsystem provides functions to manage Teslasuit assets, such as loading, retrieving, and unloading assets.

Note. Since TsAssetManager is a member of the SDK, it cannot be used independently without an active Teslasuit device.

Class TsAssetManager#

Handles TESLASUIT asset management, including loading assets from paths or binary data, retrieving asset types, and unloading assets.

Class methods#

load_asset_from_path(self, path)#

Loads an asset from a specified file path.

Args:

  • path (str): Path to the asset.

Returns:

  • TsAssetHandle: Handle to the loaded asset.
load_asset_from_data(self, data, size)#

Loads an asset from binary data.

Args:

  • data (bytes): Binary data of the asset.
  • size (int): Size of the binary data.

Returns:

  • TsAssetHandle: Handle to the loaded asset.
get_asset_type(self, asset_handle)#

Retrieves the type of a loaded asset.

Args:

  • asset_handle (TsAssetHandle): Handle to the asset.

Returns:

unload_asset(self, asset_handle)#

Unloads a previously loaded asset.

Args:

  • asset_handle (TsAssetHandle): Handle to the asset.

Explore these references and guides to work with loaded haptic assets:

Essential API references#

Practical guides & examples#

Deeper dives & broader concepts#

  • Teslasuit Main Concepts: Fundamental articles covering Teslasuit's core technology and how its subsystems interact.