x157 / x157.github.io

46 stars 7 forks source link

Tutorial Request: How/when/where does Lyra inject components into Pawns/Controllers/etc? #11

Open x157 opened 1 year ago

x157 commented 1 year ago

This is one of the super cool features about Lyra, that it can inject components into your actors at runtime.

These and related questions would make a good tutorial.

Short answer: You do have to inject components yourself into any actors that you spawn. Lyra only injects into default pawns and other default objects that it explicitly spawns for you.

Fore more info you should search for ULyraPawnData in the C++ and see where they use it. Understand what that class is and how it is used and you'll be able to accomplish the same thing yourself.

To find the injections Lyra is doing, look in:

Both of those assets may have instantiated Game Feature Actions that perform component injections.