What is the most correct way to validate the HUD?

I wonder what is the most correct way to validate the HUD…

I’ve tried doing it two different ways and they both seem to work.

The first and simplest is to check that the HUD reference is not null.

The second way is to also check that the pawn is locally controlled.

For simplicity I like the first way.

But I don’t know what bad can happen if it is not done in the second way.

What do you think?
Is it enough to do it the first way?
Or is it necessary to do it the second way?
Or maybe there is a more correct way to do it?

Thank you very much!!

Hey there @Ivan3z! The first way is perfectly fine as long as local HUD elements don’t exist to the other clients. The only time this would get iffy is if you have split screen local included. Even then it’s tied to the player controller so it should remain accurate there.

1 Like

Thank you very much for solving my doubt!
Very appreciated!! :sparkling_heart: