示例#1
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);
        }
示例#2
0
 public override void OnUninitialize()
 {
     root  = null;
     panel = null;
     mask  = null;
 }