public void SetText(string text, float seconds) { textFade.SetText(text.Replace(" [Integration]", ""), false); //AlignText(); textFade.SetState(true); textObject.SetActive(true); if (seconds > 0f && !isFadingOut) { textFade.FadeOut(seconds, null); isFadingOut = true; } }
private static uGUI_TextFade AddTextToLoadingScreen(string name, string text) { GameObject gameObject = Object.Instantiate(loadingTextGameObject, loadingTextGameObject.transform.parent); gameObject.name = name; uGUI_TextFade textFade = gameObject.GetComponent <uGUI_TextFade>(); textFade.SetText(text); textFade.SetAlignment(TextAnchor.UpperRight); textFade.FadeIn(1f, null); return(textFade); }