Answers for "replace text file unity c#"

C#
14

unity change text

// To change text of a text UI element use th combination below
textGameObject.GetComponent<UnityEngine.UI.Text>().text = "text";
Posted by: Guest on February-20-2020
4

unity replace a text in a string

public string strOne = "Hello World";
public string strTwo = "World";

public void ReplaceStrTwoFromStrOne()
{
	strOne = strOne.Replace(strTwo, "everyone"); //strOne = "Hello everyone" now
}
Posted by: Guest on April-05-2020

C# Answers by Framework

Browse Popular Code Answers by Language