I don’t actually use ShooterCore
at all, so had to install a default Lyra project to track this down.
TLDR component injection can be defined in either the Experience Definition or in the GFP definition. (Anywhere a Game Feature Action can be defined).
The ShooterCore GameFeatureData
asset defines an Add Components
Game Feature Action. Any time you load a level that activates the ShooterCore GFP it will run this action.
It defines 6 runtime-injected components, 1 of which is adding LyraEquipmentManagerComponent
to all LyraCharacter
actors spawned on either the client or server.
How I found this, in case others are trying to find other things like it:
- Breakpoint constructor of the component in question:
- PIE Lyra
In the above screenshot you see during the default pawn spawning, typical Modular Gameplay stuff is happening. Runtime components are getting added to the pawn actor.
I found a list of 6 components, one of which is the one we’re looking for.
- I then breakpointed the Game Framework Component Manager
AddComponentRequest
method which is where runtime components are registered, and found that the component in question was being registered duringOnExperienceLoadComplete
.
- All required GFPs are being loaded and activated during
OnExperienceLoaded
, so I decided to look at theShooterCore
GameFeatureData
to see what it was doing.
And voila! There is the AddComponents
Game Feature Action that interests us.