I am creating a networking package for unity, I have a Client class that contains information about the client (connection id, ping, time online, etc). Now I need to update or change some of the variables inside the Client class at runtime (the ping as an example) from the Network Manager that takes care of all the Client class instances, but at the same time I want make sure that no one can change the data inside (by making the fields readonly). Is a good Idea to use Reflection in this case ?
Solved. Just use custom Assemblies and declare variables as internal.