#include <DependencyMonitor.h>
Inherits AZ::Data::AssetBus::MultiHandler, AZ::EntityBus::MultiHandler, AZ::TransformNotificationBus::MultiHandler, ShapeComponentNotificationsBus::MultiHandler, and DependencyNotificationBus::MultiHandler.
|
| AZ_CLASS_ALLOCATOR (DependencyMonitor, AZ::SystemAllocator) |
|
| AZ_RTTI (DependencyMonitor, "{C7756A84-58D2-4171-A448-F8D3B84DF2F0}") |
|
void | Reset () |
|
void | ConnectOwner (const AZ::EntityId &entityId) |
|
void | ConnectDependency (const AZ::EntityId &entityId) |
|
void | ConnectDependencies (const AZStd::vector< AZ::EntityId > &entityIds) |
|
void | ConnectDependency (const AZ::Data::AssetId &assetId) |
|
void | ConnectDependencies (const AZStd::vector< AZ::Data::AssetId > &assetIds) |
|
void | SetEntityNotificationFunction (EntityNotificationFunction entityNotificationFn) |
|
void | SetAssetNotificationFunction (AssetNotificationFunction assetNotificationFn) |
|
void | SetDefaultNotificationFunctions () |
|
void | SetRegionChangedEntityNotificationFunction () |
|
The DependencyMonitor is a convenience class to track multiple types of changes in entities and assets and distill the changes down to a single propagated notification that downstream listeners can handle. Specifically, it listens for the following:
- Entity activated / deactivated
- Transform changed
- Shape changed
- Asset ready / reloaded / unloaded / moved
- Entity's dependencies changed All of those get distilled into a single notification that by default will trigger an OnCompositionChanged() message on the DependencyNotificationBus. However, this is sometimes a little too distilled, so an entity can override the notification functions to perform custom logic. For example, if the dependent entity has provided a dirty region via OnCompositionRegionChanged(), a function can be installed to examine the region and determine whether or not it should be propagated, changed, or ignored.
◆ AssetNotificationFunction
using LmbrCentral::DependencyMonitor::AssetNotificationFunction |
Initial value:
AZStd::function<void(const AZ::EntityId& ownerId, const AZ::Data::AssetId& assetId)>
◆ EntityNotificationFunction
using LmbrCentral::DependencyMonitor::EntityNotificationFunction |
Initial value:
AZStd::function<void(const AZ::EntityId& ownerId, const AZ::EntityId& dependentId, const AZ::Aabb& dirtyRegion)>
The documentation for this class was generated from the following files:
- Gems/LmbrCentral/Code/include/LmbrCentral/Dependency/DependencyMonitor.h
- Gems/LmbrCentral/Code/include/LmbrCentral/Dependency/DependencyMonitor.inl