I have a concern with the proper way to gathered data from a group.
I want to have multiple groups in my games with 10 members max by group, every group have a score base on the sum of every member of the group, and i want to know the best way to achieve this:
1 idea: use a cloud script that execute when player update her score in her personal data, after updating his own score, the script get score in data of all members in the group of the player (include player), add up all score and write in group data score
2 idea: when player update his own score, the script takes additional part of his score, and adds the score in group data and additional player score and write in group data
I want to know the best two ideas, if this idea is realizable, if it optimizes, or if there another way to reach it more easily.
if possible, help me with code to write (C#)