// Use this for initialization void Start() { mapSprite.sprite = mapSprites [0]; mapName.text = mapNames [0]; gameModeName.text = gameModeNames [0]; confirmServerPanel.SetActive(false); badWordLink = Camera.main.GetComponent <badWordFilter> (); }
string ScanForBadWords(string testString) { badWordFilter badWordLink = gameObject.GetComponent <badWordFilter> (); testString = testString.ToLower(); foreach (string badWord in badWordLink.profanity) { if (testString.Contains(badWord)) { testString = testString.Replace(badWord, "Love"); return(testString); } } return(testString); }