Ejemplo n.º 1
0
    private void LoadBackdrop(Action gameSplashShownCallback)
    {
        // We are calling Resources.Load() because the ResourceCache is not yet available when this method is invoked.
        // This asset is not used elsewhere and hence does not need the caching/loading behavior of the ResourceCache.
        GameObject backdropGO = Instantiate <GameObject>(Resources.Load <GameObject>("UI/" + _config.GetUIGlobalBackdropPrefab()));

        if (backdropGO != null)
        {
            backdropGO.SetActive(true);
            _backdrop = backdropGO.GetComponent <BackdropCamera>();
            _backdrop.Init();
            _backdrop.WireWidgets();
            if (_camera != null)
            {
                _camera.clearFlags = CameraClearFlags.Depth;
            }
        }
    }