Skip to content

LibraryItem

Inherits: Resource

LibraryItem is a high-level structure that contains data about a game.

Description

A LibraryItem is a single game title that may have one or more library providers. It contains an array of LibraryLaunchItem resources that can tell us how to launch a game.

Properties

Type Name Default
String name
LibraryLaunchItem[] launch_items []
PackedStringArray tags
PackedStringArray categories
bool is_hidden

Methods

Returns Signature
LibraryItem new_from_launch_item(launch_item: LibraryLaunchItem)
LibraryLaunchItem get_launch_item(provider_id: String)
bool has_launch_item(provider_id: String)
void erase_launch_item(provider_id: String)
bool is_installed()

Property Descriptions

name

String name

Name of the game

launch_items

LibraryLaunchItem[] launch_items = []

An array of LibraryLaunchItem resources that this game supports

tags

PackedStringArray tags

An array of tags associated with this game

categories

PackedStringArray categories

An array of categories the game belongs to

is_hidden

bool is_hidden

Whether or not this library item should be hidden in the library


Method Descriptions

new_from_launch_item()

LibraryItem new_from_launch_item(launch_item: LibraryLaunchItem)

Creates a new library item from the given library launch item

get_launch_item()

LibraryLaunchItem get_launch_item(provider_id: String)

Returns the library launch item for the given provider. Returns null if the given provider doesn't manage this game.

has_launch_item()

bool has_launch_item(provider_id: String)

Returns true if the LibraryItem has a LibraryLaunchItem from the given provider

erase_launch_item()

void erase_launch_item(provider_id: String)

Removes the LibraryLaunchItem associated with the given launch provider.

is_installed()

bool is_installed()

Returns true if at least one library provider has this item installed.