Foreign women, and particularly white women, attract a lot of attention in Uganda so be prepared for people to want to talk to you, touch your skin and invite you to their house. For the vast majority of the time, this attention stems from pure curiosity and is not meant in a threatening or harmful way. Occasionally men might pester you but giving the cold shoulder or a firm 'no' will usually do the trick and get them to leave you alone.
In Africa it is very uncommon for women to walk around alone so in some cases it might better simply to say your boyfriend or husband is meeting you somewhere. A photo of a man in your purse and a fake wedding ring are useful for adding credibility to your story. It is also advisable to avoid being out alone at night as muggings are not unheard of.
How about as a member of the LGBT community?
Currently, homosexuality is illegal in Uganda, and sexual activity with someone of the same gender is punishable with prison. It has been known for Western members of the LGBT community to be attacked and harassed. This is largely because of the strict Christianity of the country, homosexuality is simply not accepted as a part of Ugandan society. Whilst an outdated view, this does not mean that Ugandans are inhospitable or unfriendly people. In fact, Uganda is generally a very welcoming country, homosexuality is just not accepted like it is in other parts of the world today.
Any LGBT traveller wishing to explore Uganda would be best to behave with discretion and not to engage in any flirting or sexual activity with anyone of the same sex whilst visiting the country. As long as travellers act with discretion, there is no reason to expect any problems.