One of my favorite Pathfinder character classes is oddly enough, the Gunslinger. It brings back memories of watching episodes of Maverick with James Garner. Outgoing mystery man with a penchant for games of chance. Slow to violence, but more than capable with a gun when the need arises. Maverick would use his wits and charm to get what he needed and only resorted to the gun when the hand he was dealt left him with no other options.
The gunslinger class is an odd fit for most high fantasy campaigns that include all sorts of magic and non-human races. Paizo’s world of Golarian was written to take the gunslinger into account, but they would be woefully out of place in the Forgotten Realms or Greyhawk. Mathew Mercer has done an excellent job of weaving the Gunslinger Percy into the world of Critical Role. If your homebrew campaign lends itself more toward steampunk the gunslinger class may be a good fit as an option.
In Pathfinder the class can be a bit on the weak side at lower levels. I found that once I had hit about 6th level I was able to keep up quite well. As with most characters. If you want to know more about how to make a great gunslinger I highly recommend Surpassing even The Boss: N. Jolly’s guide to the Pathfinder Gunslinger. His series of guidebooks are on my must read list.