OnRegister() not firing on unmodified instances

I’m currently implementing a modular interaction system based on C++ components. To put it simple, you’ve got two classes of UActorComponent, one for player pawns (which implements input functions) and the other for any actor that you want to be able to interact with.

The thing that has been giving me headaches for a while and it’s seriously slowing me down, is enabling the default interaction states to be modifiable in editor and be reflected in the owning actor.

So, think of an actor representing a lightbulb, with this component included. The component has a boolean property, “ActivationState”. During play, when this boolean changes value, the component will broadcast the “OnActivationUpdate” event, and the owning actor will react to it by switching the lightbulb.

I want to be able to toggle the property in the editor to set the interaction’s default state. To do this, I had to fish for some internal UActorComponent lifecycle event that happens in editor time, but late enough that event dispatchers will be properly bound.The only one that fit was OnRegister.

However, it seems that this event doesn’t fire when you happen to set all the instance’s properties back to their default values. It’s like instead of changing the property, when the component is manually set to it’s default values it gets destroyed and rebuilt, without ever firing the OnRegister event. The sad thing is, that the PostEditChangeProperty event DOES register the change properly… But it happens BEFORE the actor binds the component events, so if I broadcast from there, the actor won’t react at all.

Of course, a somewhat patchy solution is to add a dummy property to the component, and toggle it in every instance so there’s that one always modified to avoid the component from ever “resetting”, but I would love to figure out how to do this the “proper” way, if any.