2nd class in same file is "inactive" ?

I have a class called Player in my Player.cs file, and I also have a class called PlayerUI in the same file.

In the first class “Player”, everything gets called properly.

However, in the second class “PlayerUI”, no Update function gets called, and none of the serializefield variables show up in inspector.

Is it not possible to have 2 classes in the same file in unity C# or am I doing something very wrong?

I don’t think it’s possible because the file name must match the class name and you can’t create 2 classes with the same name in the same namespace.