Example #1
0
        public void Setup(DeviceFrame layerPrefab, UIManager uiManager, UISortingLayer.Layers layer)
        {
            _layerPrefab = layerPrefab;
            _uiManager   = uiManager;
            _layer       = layer;

            _uiHeap      = new UIGroupHeap();
            _currentSort = MIN_SORT;
        }
Example #2
0
        private void ActivateLayerIfNeed()
        {
            if (_layerRoot == null)
            {
                _layerRoot = GameObject.Instantiate <DeviceFrame>(_layerPrefab, _uiManager.layerRoot);
                _layerRoot.canvas.renderMode  = RenderMode.ScreenSpaceCamera;
                _layerRoot.canvas.worldCamera = _uiManager.uiCamera;
            }

            if (_showing)
            {
                ActivateCanvasIfNeeded();
            }
            else
            {
                HideCanvasIfNeeded();
            }
        }
Example #3
0
 public UIManager(DeviceFrame layerPrefab, Transform layerRoot)
 {
     _layerPrefab = layerPrefab;
     _layerRoot   = layerRoot;
 }
Example #4
0
 private void OnDeviceFrameLoaded(DeviceFrame asset)
 {
     Debug.LogFormat("<color=green>INFO:</color> Loaded <color=cyan>{0}</color>", asset.name);
     _layerPrefab = asset;
 }