Extending Subsystems to Customize Integration
There are three primarily layers that can be extended in the RallyHere Unreal Integration:
- The actual subsystems
URH_GameInstanceSubsystem
andURH_LocalPlayerSubsystem
- The Subsystem plugins (originally Subsystems of their own, and generally named as such) such as URH_CatalogSubsystem and URH_PlayerInfoSubsystem
- The plugin subobjects such as URH_PlayerInfo and URH_PlayerInventory
Extending Subsystems
To extend the URH_GameInstanceSubsystem
and URH_LocalPlayerSubsystem
classes, you’ll need to create a new class that inherits from the base class and override the virtual functions you want to extend. They will automatically detect if a subclass exists during startup, and if so will not instantiate themselves so that the subclass will be used instead.
Extending Subsystem Plugins
To extend the subsystem plugins, make a subclass of the plugin class that inherits from the base class. Then in the Plugin Settings (available in editor or directly by editing the INI), set the class to use to the new subclass.
Once compiled, launch the Unreal Editor and navigate to Edit → Project Settings...
.
Under the Plugins
section in the left pane of the window, select Rally Here Integration Settings
, then scroll down in the right pane to the Subsystem Classes
section.
Set the Catalog Subsystem Class
to MyCatalogSubsystem
.
Extending Subobjects
Primary subobjects may have configurable overrides directly in the settings (such as URH_PlayerInfo
).
However, within some subobjects, such as URH_PlayerInfo
there may be helper subojects as well. For these, standard Unreal Engine subobject class overriding via FObjectInitializer
is respected.
For example, if we wanted to add custom behavior to the URH_PlayerInventory
subobject of URH_PlayerInfo, we’d create three classes:
Once compiled, launch the Unreal Editor and navigate to Edit → Project Settings...
.
Under the Plugins
section in the left pane of the window, select Rally Here Integration Settings
, then scroll down in the right pane to the Subsystem Classes
section.
Set the Player Info Class
to MyPlayerInfo
.