void Save()
    {
        bool   canSave         = true;
        string notificationMsg = string.Empty;

        // check if names are valid
        foreach (var d in allLeaderboards)
        {
            if (d.id.Contains("New ID") || d.id.Length == 0)
            {
                canSave         = false;
                notificationMsg = "Leaderboard (" + d.id + ") has invalid name!\n";
                break;
            }
        }

        if (!canSave)
        {
            ShowNotification(new GUIContent(notificationMsg + "\nConfig is not saved!"));
        }
        else
        {
            if (allLeaderboards.Count > 0)
            {
                gameDB.DeleteAllConfigs(allLeaderboards[0].GetTableName());
            }
            foreach (var p in allLeaderboards)
            {
                gameDB.SaveConfig(p.GetTableName(), p.id, LitJson.JsonMapper.ToJson(p));
            }
            gameDB.IncrementLocalDBVersion();
            InitLeaderboardNames();
            dirty = false;
        }
    }