How to add a State to PlayerController?

I’m failing to find where does the basics PlayerController states are declared and defined:

  • NAME_Inactive
  • NAME_None
  • NAME_Playing
  • NAME_Spectating

I know that I can just add use a literal FName for this, but I wanted to understand how they are declared and if it’s possible to add my custom states as predefined constants.

It might be helpful to understand what you end goal is. Are you trying to track your own game specific state information in the player controller? If so then it probably will be better to create your own state machine parallel to the PlayerController states where your own game specific logic can be stored.