I would attach some data (via properties on your own monobehaviour) to your "people" game objects. A monobehaviour with all the measurable person attributes. You can then check that component for the individual (player or npc) when they interact (collider triggers on enter, exit, stay etc).
If you want a global property, than statics are a useful singleton approach. That is, you might have a static enum or bool on your person monobehaviour called perhaps "MenuSelectedGender". It's static so will be addressed via the class type Person.MenuSelectedGender.
This feels a bit of kludge to me though. If you ever get in to multiplayer, globals /statics may not help.
Anyway, hope this helps.
↧