protected void set_anchor(string a) { if (m_latest_rt == null) { throw new SystemException("Unexpected! {C1BAF5D5-5453-41C9-80D5-333D7F7FCD4A}"); } UGuiUtil.SetAnchor(m_latest_rt, a); }
public void SetError(string msg) { if (m_canvas.transform.childCount == 0) { var panel = UGuiUtil.FindAndClone(m_template.transform, "Panel", m_canvas); panel.name = errorpanelname; UGuiUtil.SetPivot(panel, UIANCHORPOS.MC); UGuiUtil.SetAnchor(panel, UIANCHORPOS.MC); UGuiUtil.SetSize(panel, ScreenDef.reference_width, ScreenDef.reference_height_fix); UGuiUtil.SetPos(panel, 0, 0); } var clone = (GameObject)GameObject.Instantiate(m_errorDlgUI); clone.transform.SetParent(m_canvas.transform); UGuiUtil.SetPos(clone, 0, 0); UGuiUtil.SetText(clone, msg, "Text"); //clone.transform.localPosition = VectorUtil.Affect_Z(clone.transform.localPosition,0); }