Just wondering at what point in the writing process do you decide on (or discover) a character's sexuality? Do you decide before you write a single word? Or somewhere during the first draft when the character first encounters a potentially sexual situation?

I've done both, probably a mix of 50-50. My first gay character, I didn't even know he was gay until someone told me halfway through the second draft. Oddly, my character's parents and best friend knew. It explained why I was having a hell of a time getting him to fall in love with the female lead.