How do I register and unregister Event On begin/End of gameplay in a custom component?

i’m using begin play and end play in the custom component(UStaticmeshComponent) but the problem is begin play is getting triggered more than once in my custom component and my end play function do not get triggered.

What would be the best approach to register and unregister events On begin and end of the game play in a custom component, in my case it is inherited from UStaticMesh but i would like to know the approach in general ?

P.S i want my component to be isolated so i can add in other objects.

I’m using BeginPlay() and BeginDestroy() at the moment things work fine. If there is any better approach I would like to know it. Thank you :slight_smile: