On Component Edited callback (C++)

Hi,

I am currently working on a ledge system. I’ve prototyped my system using Blueprints and want to now rebuild the system in c++ for performance and handling reasons. My ledge actors contain a spline component which marks the actual ledge. Because I couldn’t get the spline to trigger overlaps, I wrap the spline in proxy box components. In Blueprint I did the wrapping in the Construction-Script, however that doesn’t work in c++.
I am now looking for the right place to do the wrapping. I have tried PostActorCreated() and PostLoad(), but both haven’t worked.

Is there a method that is called every time a component of the actor is changed? Or better yet, is there a way to specifically listen for changes to the spline?

Cheers,
Todd

Have you tried the c++ OnConstruct method? That’s the equivalent of the construction script.

If you want a general “after actor created / loaded”, use PostInitializeComponents. Don’t forget to call the parent method.

Thank you! That is the right place! One weird thing though: The BoxComponents I’m creating aren’t showing up in the editor anymore even though I haven’t changed the code for their creation. Do you have an idea why that is?

Not a clue!