r/SoloDevelopment • u/r_s1ckboy • 1d ago
Unity PurrFanity - Profanity Filter [Unity]
I finally finished making a profanity filter i've been thinking of for the past 2-3 months as I didnt really like the existing ones. Its only english right now but the project can be used in any Unity game above 2022.3.
Here's a pic of how fast it works and how much GC gets allocated. The other two pictures are the SO (Scriptable Object) and a snippet of how I quickly tested it in my own GameManager.
I personally give people option in a settings menu in my WIP game to what they want to censor out and how with a custom logic. Lobby names however will not be allowed to set as slurs and playernames will be censored if they are using bad language.
Little info on it: Categories can be dealt with different ways depending on what you'd like to do. Block phobic or racial slurs while keeping mild cussing? maybe replacing sexual words with silly words like meow? You can do it. Or add your own custom word lists with another SO.
It's MIT license, so you are free to fork, modify, redistribute and so on. Feel free to contribute to it, I welcome any and all ^^
Also it deals with words like 5___%/TuP$iD (stupid) and censors it the way you see fit



3
u/INeatFreak 1d ago
Biscuit
1
u/FunToBuildGames 1d ago
A game I used to play would turn asshole/arsehole into cartoon… and that somehow make it more offensive lol