I want to create a general warning window to display information about some information, possibly a warning, a tutorial, etc.,
I think it will be good if there is a way for the warning widget (basically, only the window frame, close button, information text and some tips) to appear when the event is received, so in I could just take off msg via the static method , and the widget could just appear.
I have no problems with the execution of part of the event, but I could not find a way to activate the game object of the widget, since it will be deactivated as the game starts and, it seems, cannot assign itself an event pool.
Is there any way to do this? Or how do you deal with the problem?

And so the appointment of the event is still complete:
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class WarningTextUGUIController : MonoBehaviour { private Text text;
I should note that everything will work if I make the widget active at the beginning of the game, but I have to disable it, because it should not be displayed in most cases.
c # events unity3d
armnotstrong
source share