Overview
Language and Profanity Filter is the ultimate text filter for your project. Monitoring and controlling user generated content is one of the main challenges when creating online games. With in-game chats and forums, player-to-player (P2P) interaction and web/game integration being very common these days, it’s the game developer’s responsibility to ensure a safe and (usually) children-friendly environment.
With that in mind, I’d like to introduce my latest Unity Asset – Language and Profanity Filter. Language and Profanity Filter is the ultimate text filter for your project. It provides developers with a variety of filters to filter out unwanted content from their games, thus providing a safer and friendlier user experience. Language and Profanity Filter comes with a set of predefined filters, including bad words and profanities filters. These filters come with support for various languages, such as English, German, French and Russian. Those filters come with a set of predefined blocked words, and developers can easily add more words, or even create their own languages.
Purchase Language and Profanity Filter from the Unity Assets Store here >>
In addition, several additional filters are provided out-of-the-box, such as emails and web addresses filters, a punctuation filter (to prevent ASCII arts and excessive!!! punctuation!!! usage!!!)
Finally, the asset comes with a generic regular expression (regex) filter, allowing developers to identify and filter any unwanted content.
Language and Profanity Filter supports replacing filtered content with a placeholder (e.g., ***) or by adding a prefix/suffix (such as <b>
and </b>
).
Screenshots
Supported Languages
Language and Profanity Filter supports multiple languages, and comes out of the box with the following list of supported languages (each language has its own list of blocked words):
- Arabic
- Chinese
- Czech
- Danish
- Dutch
- English
- Esperanto
- Finnish
- French
- German
- Hindi
- Hungarian
- Italian
- Japanese
- Korean
- Norwegian
- Persian
- Polish
- Portuguese
- Russian
- Spanish
- Swedish
- Thai
- Turkish
In addition, Language and Profanity Filter supports Leet language.
Documentation
How to use Language and Profanity Filter
In Place mode
Add the InPlaceFilter
script to an InputField
object.
Add one or more Filter
objects.
Text will be automatically filtered when the input changes in the InputField
On Demand mode
Add the OnDemandFilter
field to an object.
Assign an InputField
and a target Text
object.
From your scripts, or in the OnClick
event of a button, invoke the Filter()
method.
Types of Filters
The component supports a variety of filters – Language, Email, Web Addresses, Punctuation and Regex.
Language
Language profanity filters support filtering a list of words. The filter uses a Language ScriptableObject
that contains the list of unallowed words. The asset comes with a list of 24 languages out of the box. It also supports custom languages.
Each Language filter can be assigned one or more Language objects:
Emails
The Emails profanity filter is based on the more generic RegEx profanity filter, and identifies email addresses.
Web Sites
The Web Sites profanity filter is based on the more generic RegEx profanity filter, and identifies web addresses.
Punctuation
The Punctuation profanity filter allows identifying repeated punctuation signs and prevent multiple repetitions.
RegEx
The RegEx profanity filter is a generic filter, that allows identifying any regular expression.