Are delegates a good practice?

Thank you for the answer, Im gonna put it as solution but, I would like to ask you one more thing before.

Let me put an example of my project.

As I have one widget and I switch between characters, possessing them.
I have a Health variable that replicates so when the Health change I have a delegate that sends Health and MaxHealth.

So in my widget I have a Health Bar and a method that subscribe to that delegate in the constructor.

The problem: The widged had subscribe to that delegate of that character, so when I switch pawn Im still receiving the Health changes of the first pawn.

  • Would be a good practise subscribing and unsubscribing to the delegate in the widget?
  • Is better if I just destroy and recreate the widget every time I switch pawn?
  • Should I stop using in that case delegates and just be casting to the pawn class and get the Health instead?

Thank you so much for your answer.