示例#1
0
    public void ShowException(Exception ex)
    {
        //Debug.LogException(ex);
        _exceptionPanel.gameObject.SetActive(true);
        _exceptionPanel.ShowException(ex);

        ExceptionData exceptionData = null;

        foreach (KeyValuePair <string, ExceptionData> exception in _gameData.Exceptions)
        {
            if (ex.GetType().Name == exception.Value.Name)
            {
                exceptionData = exception.Value;
                break;
            }
        }

        if (exceptionData != null)
        {
            _popUpManager.ShowNotification(exceptionData.Message.GetLocalized(_profile.Language));
        }
    }