Create New Relationship GameObjects - ShiJbey/TDRS GitHub Wiki
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.
- Add a
RelationshipControllercomponent to the GameObject you wish to connect. - Drag one of your agent GameObjects to the
Ownerfield. - Drag another agent to the
TargetField. - 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.
- Configure initial stats and traits (if new relationship). Existing relationship values will not be overwritten.
- 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 theSocialEngineControllerinstance.- Registering a relationship will fail if the owner and target agents do not already exist within TDRS.
Sample Relationship Controller
