There's some argument that both gender identity and sexual orientation are set in-utero. They're doing studies on twins where only one is trans. So there are obviously conditions in the womb that affect the development of an individual's gender.