Answers for "find text unity"

C#
2

unity search for specific text in a string

public string testString = "I hope this help you";
public string otherCase = "I hope";

public void SearchForText()
{
	if(testString.Contains("you"))
    {
      Debug.Log("The variable testString contains the word you")
    }
  	if(testString.Contains(otherCase))
    {
     	Debug.Log("The variable testString contains the value of the variable otherCase")
    }
}
Posted by: Guest on April-04-2020
1

get text unity

numericalScore.GetComponent<UnityEngine.UI.Text>().text = "Score : " + scoreManager.score;
Posted by: Guest on July-18-2021

C# Answers by Framework

Browse Popular Code Answers by Language