MessageList.AddTextEntry C# (CSharp) Method

AddTextEntry() public method

Allows the Chatapp to add new entires to the list
public AddTextEntry ( string text ) : void
text string Text to be added
return void
    public void AddTextEntry(string text)
    {
        GameObject ngp = Instantiate(uEntryPrefab);
        Text t = ngp.GetComponentInChildren<Text>();
        t.text = text;
        RectTransform transform = ngp.GetComponent<RectTransform>();
        AddRectTransform(transform);
        Refresh();
    }

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Adds a new message to the message view
 /// </summary>
 /// <param name="text"></param>
 public void Append(string text)
 {
     if (uMessageOutput != null)
     {
         uMessageOutput.AddTextEntry(text);
     }
     Debug.Log("Chat output: " + text);
 }
All Usage Examples Of MessageList::AddTextEntry