public static void AddLine(string name, string text) { if (singleton != null) { GameObject obj2 = (GameObject)Object.Instantiate(singleton.chatLine); if (obj2 != null) { ChatLine component = obj2.GetComponent <ChatLine>(); component.Setup(name + ":", text); singleton.chatContainer.AddControl(component.GetComponent <dfPanel>()); } } }
public static void AddLine(string name, string text) { if (ChatUI.singleton == null) { return; } GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(ChatUI.singleton.chatLine); if (gameObject == null) { return; } ChatLine component = gameObject.GetComponent <ChatLine>(); component.Setup(string.Concat(name, ":"), text); ChatUI.singleton.chatContainer.AddControl(component.GetComponent <dfPanel>()); }