Is it affectionate when someone tells you goodnight?

If someone says goodnight and then your name. Like “goodnight Hannah”, or am I reading too much into it?
Is it affectionate when someone tells you goodnight?
Post Opinion