How would I store local data on the server, without overwriting that server's own data? Essentially making a copy.
I have 2 clients, both have a script ProvinceManagement.cs which holds a list of province objects that have data such as province values, province name, province transform etc. When the client is started it grabs all of the province transforms associated with that client’s chosen nation and creates Province objects assigning those transforms. This happens for both clients and obviously results in 2 different lists of Province objects. This also occurs on the server.
Now, currently the Province lists are local to each player, I want to make it so that each client’s province lists/data is stored both locally for use on UI, but also stored on the server so that if something needs to check the data before it can carry out a task, it can check for the server’s copy of the data to avoid tampering with the data locally. The problem I am having is that if I ask for the server’s ProvinceManagement.cs Province list, it will grab the servers Provinces and not the clients and if I try to send the client’s Province list via a [Command], it will just overwrite the servers list.
The problem of it overwriting the server’s data isn’t the issue really, as I plan to have the server be a headless server in the future, but the problem is that I cannot have just a networked copy of each client’s ProvinceManagement.cs script.
How would I go about storing all clients Province lists, and data, on the server and not just locally to make it more secure?
It is kind of difficult to explain, so if you need more detail, please ask.