UGameFrameworkComponentManager

GameFrameworkComponentManager

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ModularGameplay

Header

/Engine/Plugins/Experimental/ModularGameplay/Source/ModularGameplay/Public/Components/GameFrameworkComponentManager.h

Include

#include "Components/GameFrameworkComponentManager.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(MinimalAPI)
class UGameFrameworkComponentManager : public UGameInstanceSubsystem

Remarks

GameFrameworkComponentManager

A manager to handle putting components on actors as they come and go. Put in a request to instantiate components of a given class on actors of a given class and they will automatically be made for them as the actors are spawned. Actors must opt-in to this behavior by calling AddReceiver/RemoveReceiver for themselves when they are ready to receive the components and when they want to remove them. Any actors that are in memory when a request is made will automatically get the components, and any in memory when a request is removed will lose the components immediately. Requests are reference counted, so if multiple requests are made for the same actor class and component class, only one component will be added and that component wont be removed until all requests are removed.

Functions

Name Description

Public function

TSharedPtr< ...

 

AddComponentRequest

(
    const TSoftClassPtr< AActor >& Rec...,
    TSubclassOf< UActorComponent > Comp...
)

Adds a request to instantiate components on actors of the given classes.

Public function Static

void

 

AddGameFrameworkComponentReceiver

(
    AActor* Receiver,
    bool bAddOnlyInGameWorlds
)

Adds an actor as a receiver for components (automatically finding the manager for the actor's game instance).

Public function UFunction BlueprintCallable, Category, Meta

void

 

AddReceiver

(
    AActor* Receiver,
    bool bAddOnlyInGameWorlds
)

Adds an actor as a receiver for components.

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function Static

void

 

DumpGameFrameworkComponentManagers()

Public function

void

 

InitGameFrameworkComponentManager()

Public function Static

void

 

RemoveGameFrameworkComponentReceiver

(
    AActor* Receiver
)

Removes an actor as a receiver for components (automatically finding the manager for the actor's game instance).

Public function UFunction BlueprintCallable, Category, Meta

void

 

RemoveReceiver

(
    AActor* Receiver
)

Removes an actor as a receiver for components.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss