Lyra: where tf is equipment manager component initialized?

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:

  1. Breakpoint constructor of the component in question:

  1. 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.

  1. 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 during OnExperienceLoadComplete.

  1. All required GFPs are being loaded and activated during OnExperienceLoaded, so I decided to look at the ShooterCore GameFeatureData to see what it was doing.

And voila! There is the AddComponents Game Feature Action that interests us.

11 Likes