示例#1
0
 public void Hide()
 {
     if (mask)
     {
         mask.Hide();
     }
     if (panel)
     {
         panel.Hide();
     }
     ClickOKEvents.Clear();
     ClickCancelEvents.Clear();
 }
示例#2
0
        public override void OnInitialize()
        {
            var prefab = VRRes.Load <GameObject>(R.Prefab.GlobalUIRoot);

            root = gameObject.AddChild <Canvas>(prefab);
            root.sortingLayerName = VRSortingLayer.GlobalUI;
            root.worldCamera      = Camera.main;
            mask = root.GetComponentInChildren <GlobalMask>();
            mask.Hide();
            panel        = root.GetComponentInChildren <GlobalPanel>();
            panel.ok     = OnClickOK;
            panel.cancel = OnClickCancel;
            panel.Hide(true);
        }