Way to access originating device from subscription events?

I’m trying to do something like

CaptureArea := capture_area_device{}
CaptureArea.AgentEntersEvent.Subscribe(OnEnter)

OnEnter(Agent: agent):void=
Self.GetTransform()

Where I would want Self to refer to the capture_area device and allow me to capture the transform. However, it seems Self just refers to the parent class, which I’m guessing is expected.

Is there any way that I can get access to the originating device of an event? I would really like to be able to get metadata about the device.

This is the snippet you are looking for:
Wrapping Subscribe() to pass additional data to listeners | Epic Developer Community

2 Likes

lifesaver! thanks for the help

2 Likes

This is an interesting way too! Thanks for sharing that