public static void Pop(string info) { if (script == null) { GameObject obj = GameObject.Find("ToastSystem"); if (obj != null) { script = obj.GetComponent <ToastScript>(); if (script == null) { Debug.LogError("can not find ToastSystem with ToastScript"); } } } if (script != null) { script.Toast(info); } }