//Comfrom 0:从界面返回 1:从战斗场景返回(回放或者复仇) public static MailBox OpenUI(int Comfrom = 0, MailBoxShowTab directShow = MailBoxShowTab.Invalid) { Object prefab = PrefabLoader.loadFromPack("JC/MailBox"); if (prefab != null) { GameObject obj = Instantiate(prefab) as GameObject; RED.AddChild(obj, DBUIController.mDBUIInstance._bottomRoot); obj.transform.localScale = Vector3.one; obj.transform.localPosition = Vector3.zero; obj.transform.localEulerAngles = Vector3.zero; _mInstance = obj.GetComponent <MailBox>(); _mInstance.Comfrom = Comfrom; _mInstance.showTab = directShow; _mInstance.Init(); } return(_mInstance); }