Flexible Subsystem Updates provide a way to call, from game code, the Update function of subsystems within the AI system. This allows developers to easily modify the order or frequency in which these subsystems are updated by:
- Telling the AI system which subsystems are manually updated from game code, making the Update function skip updating those subsystems. This is done to prevent the same subsystems from being updated twice.
- Manually updating the subsystems from game code. This immediately executes the Update function on the specified subsystems.
The following is a list of AI subsystems that can be manually updated from game code:
|Behavior Tree Manager|
|Global Intersection Tester|
The above subsystems can be accessed from code by typing IAISystem::ESubsystemUpdateFlag::SubsystemName, where SubsystemName corresponds to the name of the AI subsystem that you'd like to manually update.
Setting Override Update Flags
As mentioned in the Overview, the first step in modifying the order/frequency in which AI subsystems are updated, is to tell the AI system which subsystems you'd like to override. This is done by calling GetOverrideUpdateFlags only once during initialization, and setting the right flags.
The following example demonstrates how to override the NavigationSystem AI subsystem.
Manually Updating the Subsystem
The next step is to manually call the Update function on the NavigationSystem AI subsystem by calling UpdateSubSystem on the AISystem.
On This Page
- No labels