Skip to content

Create New Relationship GameObjects

Shi Johnson-Bey edited this page Feb 21, 2024 · 2 revisions

How to create new relationship GameObjects

This guide explains connecting Relationship instances within TDRS to GameObjects within your Unity scene. If a relationship already exists within TDRS, the GameObject will display that relationships's stats. If not, TDRS will create a new relationship for the controller to display.

  1. Add a RelationshipController component to the GameObject you wish to connect.
  2. Drag one of your agent GameObjects to the Owner field.
  3. Drag another agent to the Target Field.
  4. Make sure you have a proper the Relationship Schema that handles relationship instances from the owner't agent type to the target's agent type.
  5. Configure initial stats and traits (if new relationship). Existing relationship values will not be overwritten.
  6. TDRS will automatically discover the RelationshipController at the beginning of the game. If this character is created mid-game, please call the RegisterRelationship() method on the SocialEngineController instance.
    • Registering a relationship will fail if the owner and target agents do not already exist within TDRS.

Sample Relationship Controller

relationship controller screenshot