Class

RezRelationship

RezRelationship()

Constructor

# new RezRelationship()

Represents a relationship between two game objects in the Rez game engine. Relationships are directional (source -> target) and can have attributes like strength, type, or other relationship-specific data. Each relationship automatically gets source_id and target_id attributes that reference the related objects.

View Source rez_relationship.js, line 5

Extends

Methods

# static constructor(id, attributes)

Creates a new relationship instance between two game objects

Parameters:
Name Type Description
id string

unique identifier for this relationship (typically "rel_sourceId_targetId")

attributes object

relationship attributes including source_id and target_id

View Source rez_relationship.js, line 15

# static inverse() → {RezRelationship|null}

Gets the inverse relationship where the target and source are swapped. Since relationships are directional, the inverse represents the relationship in the opposite direction.

View Source rez_relationship.js, line 29

the inverse relationship (target -> source) or null if it doesn't exist

RezRelationship | null