Class

RezGroup

RezGroup()

Constructor

# new RezGroup()

Represents a dynamically generated group of assets in the Rez game engine. Groups filter assets based on type, include_tags, and exclude_tags attributes. Provides methods for getting random assets from the filtered collection.

View Source rez_group.js, line 8

Extends

Methods

# static constructor(id, attributes)

Creates a new asset group instance

Parameters:
Name Type Description
id string

unique identifier for this group

attributes object

group attributes including type, include_tags, exclude_tags

View Source rez_group.js, line 17

# static elementInitializer()

Initializes the group by filtering assets during game startup

View Source rez_group.js, line 28

# static filterAssets()

Filters all game assets based on type, include_tags, and exclude_tags to build the group's asset collection. The filtered assets are shuffled and stored.

View Source rez_group.js, line 37

# static randomAssetId() → {string}

Gets a random asset ID from this group, consuming it from the collection. If the group is empty, it will re-filter assets first.

View Source rez_group.js, line 81

if no matching assets are found

Error

ID of a random asset from this group

string