public void Log(string text)
 {
     // Only put messages if the debug window is active
     if (IsDebugWindowActive())
     {
         notification.AddItem(text);
     }
 }
Exemple #2
0
    /// <summary>
    /// Called from a button OnClick event in the example
    /// </summary>
    public void AddRandomNotification()
    {
        //Get a random MessageOption from the array
        NotificationOptions option = options[Random.Range(0, options.Length)];

        //Add the message
        m_Notification.AddItem(option);
    }
        public override ActionStatus OnUpdate()
        {
            Notification widget = WidgetUtility.Find <Notification>(this.m_WidgetName);

            if (widget == null)
            {
                Debug.LogWarning("Missing notification widget " + this.m_WidgetName + " in scene!");
                return(ActionStatus.Failure);
            }
            return(widget.AddItem(this.m_Notification)?ActionStatus.Success:ActionStatus.Failure);
        }