Navigation
API > API/Plugins > API/Plugins/ModularGameplay > API/Plugins/ModularGameplay/Components > API/Plugins/ModularGameplay/Components/UGameFrameworkComponentManager
References
| Module | ModularGameplay |
| Header | /Engine/Plugins/Runtime/ModularGameplay/Source/ModularGameplay/Public/Components/GameFrameworkComponentManager.h |
| Include | #include "Components/GameFrameworkComponentManager.h" |
| Source | /Engine/Plugins/Runtime/ModularGameplay/Source/ModularGameplay/Private/Components/GameFrameworkComponentManager.cpp |
TSharedPtr< FComponentRequestHandle > AddComponentRequest
(
const TSoftClassPtr< AActor > & ReceiverClass,
TSubclassOf< UActorComponent > ComponentClass,
const EGameFrameworkAddComponentFlags AdditionFlags
)
Remarks
Adds a request to instantiate components on actors of the given classes. Returns a handle that will keep the request "alive" until it is destructed, at which point the request is removed. Will return null if there is already an active request with same Receiver & Component classes.
Parameters
| Name | Description |
|---|---|
| ReceiverClass | The class on which we should add the component onto |
| ComponentClass | The component class to add on the new instance |
| AdditionFlags | (optional) Set of flags to considered at component creation |