Question about actor component dependencies and notifications

I work with runtime added components very often. I run into situations where component A is dependent on component B, however, component B is not available when component A executes begin play. This creates a situation where I need to resolve dependency at runtime. I would really like to see events at the actor level that notify Subscribers when components are added or removed. In the absence of these type of events, does anyone know how a component might be notified when a sibling component has been added or removed from the owning actor at runtime?

The simplest thing is to wrap the component creation/deletion functions with their own function, which also calls a delegate (located in the game instance or subsystem), notifying everyone who is subscribed.

I’m not 100% sure, but I think the engine had a notification about the creation of ANY object, but you’d be filtering out 99% of the triggers in that case. So, using your own wrapper is the best option, in my opinion.

That’s always an issue with BeginPlay, you don’t know when it fires. It’d be better to create you own initialisation function and call it on all components when the parent actor begins play since that happens post components or call it manually.

Thanks for the responses. I may need to create a wrapper or some kind of component tracker component to get the functionality I need.