Example #1
0
    public static MessageUI AutoShowMessage(string msg, bool hasMask, MessageCallbackEvent e, float showTime)
    {
        //Debug.Log("msg uui");
        if (null == prefab)
        {
            prefab = Resources.Load("MessageCanvas") as GameObject;
        }
        GameObject go    = GameObject.Instantiate(prefab);
        MessageUI  uiCtr = go.GetComponent <MessageUI> ();

        uiCtr.ShowMessage(msg, hasMask, e, showTime);
        return(uiCtr);
    }